Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +11 -13
Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
FROM debian:bookworm
|
| 2 |
LABEL description="Chrome With noVNC" \
|
| 3 |
maintainer="admin@fever.ink" \
|
| 4 |
-
version="2.
|
| 5 |
|
| 6 |
# Cài Chrome
|
| 7 |
RUN \
|
|
@@ -17,16 +17,15 @@ RUN \
|
|
| 17 |
apt install --no-install-recommends -y tightvncserver xfonts-base git websockify python3 net-tools procps && \
|
| 18 |
git clone https://github.com/novnc/noVNC.git /opt/novnc
|
| 19 |
|
| 20 |
-
# Tạo
|
| 21 |
RUN \
|
| 22 |
-
mkdir -p /config/google-chrome /
|
| 23 |
-
touch /config/google-chrome/First\ Run /
|
| 24 |
-
echo "Binhminh" | vncpasswd -f > /
|
| 25 |
-
echo "#!/bin/sh\nunset SESSION_MANAGER\nunset DBUS_SESSION_BUS_ADDRESS\nwhile [ 1 ]; do /opt/google/chrome/google-chrome --test-type --window-size=$((WIDTH+1)),$((HEIGHT+1)) --no-sandbox --window-position=0,0 --user-data-dir=/config/google-chrome; done" > /
|
| 26 |
chmod -R 777 /config /opt/novnc && \
|
| 27 |
-
chmod 600 /
|
| 28 |
-
chmod 700 /
|
| 29 |
-
chown -R nobody:nogroup /home/nobody /config
|
| 30 |
|
| 31 |
# Copy và cấu hình chrome-novnc.sh
|
| 32 |
COPY chrome-novnc.sh /usr/bin/chrome-novnc.sh
|
|
@@ -40,9 +39,9 @@ ENV \
|
|
| 40 |
HEIGHT=720 \
|
| 41 |
LANGUAGE=zh_CN.UTF-8 \
|
| 42 |
VNC_PASSWD=Binhminh \
|
| 43 |
-
HOME=/
|
| 44 |
-
XDG_CONFIG_HOME=/
|
| 45 |
-
VNC_DIR=/
|
| 46 |
|
| 47 |
EXPOSE 7860
|
| 48 |
|
|
@@ -54,5 +53,4 @@ RUN \
|
|
| 54 |
apt autoremove --purge -y && \
|
| 55 |
rm -rf /var/lib/apt/lists/*
|
| 56 |
|
| 57 |
-
USER nobody
|
| 58 |
CMD ["bash", "-c", "/usr/bin/chrome-novnc.sh"]
|
|
|
|
| 1 |
FROM debian:bookworm
|
| 2 |
LABEL description="Chrome With noVNC" \
|
| 3 |
maintainer="admin@fever.ink" \
|
| 4 |
+
version="2.5"
|
| 5 |
|
| 6 |
# Cài Chrome
|
| 7 |
RUN \
|
|
|
|
| 17 |
apt install --no-install-recommends -y tightvncserver xfonts-base git websockify python3 net-tools procps && \
|
| 18 |
git clone https://github.com/novnc/noVNC.git /opt/novnc
|
| 19 |
|
| 20 |
+
# Tạo thư mục và file với quyền phù hợp
|
| 21 |
RUN \
|
| 22 |
+
mkdir -p /config/google-chrome /config/.vnc && \
|
| 23 |
+
touch /config/google-chrome/First\ Run /config/.vnc/passwd /config/.vnc/xstartup && \
|
| 24 |
+
echo "Binhminh" | vncpasswd -f > /config/.vnc/passwd && \
|
| 25 |
+
echo "#!/bin/sh\nunset SESSION_MANAGER\nunset DBUS_SESSION_BUS_ADDRESS\nwhile [ 1 ]; do /opt/google/chrome/google-chrome --test-type --window-size=$((WIDTH+1)),$((HEIGHT+1)) --no-sandbox --window-position=0,0 --user-data-dir=/config/google-chrome; done" > /config/.vnc/xstartup && \
|
| 26 |
chmod -R 777 /config /opt/novnc && \
|
| 27 |
+
chmod 600 /config/.vnc/passwd && \
|
| 28 |
+
chmod 700 /config/.vnc/xstartup
|
|
|
|
| 29 |
|
| 30 |
# Copy và cấu hình chrome-novnc.sh
|
| 31 |
COPY chrome-novnc.sh /usr/bin/chrome-novnc.sh
|
|
|
|
| 39 |
HEIGHT=720 \
|
| 40 |
LANGUAGE=zh_CN.UTF-8 \
|
| 41 |
VNC_PASSWD=Binhminh \
|
| 42 |
+
HOME=/config \
|
| 43 |
+
XDG_CONFIG_HOME=/config \
|
| 44 |
+
VNC_DIR=/config/.vnc
|
| 45 |
|
| 46 |
EXPOSE 7860
|
| 47 |
|
|
|
|
| 53 |
apt autoremove --purge -y && \
|
| 54 |
rm -rf /var/lib/apt/lists/*
|
| 55 |
|
|
|
|
| 56 |
CMD ["bash", "-c", "/usr/bin/chrome-novnc.sh"]
|