mn9206986 commited on
Commit
24d95dd
·
verified ·
1 Parent(s): 0a7e077

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -25
Dockerfile CHANGED
@@ -1,43 +1,53 @@
1
  FROM debian:bookworm
2
  LABEL description="Chrome With noVNC" \
3
- maintainer="admin@fever.ink" \
4
- version="2.0"
5
 
6
  # Install Chrome
7
  RUN \
8
- apt update && \
9
- apt upgrade -y && \
10
- apt install --no-install-recommends -y wget && \
11
- apt install --no-install-recommends -y fonts-droid-fallback && \
12
- wget --no-check-certificate https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/google-chrome-stable_current_amd64.deb && \
13
- apt install --no-install-recommends -f -y /tmp/google-chrome-stable_current_amd64.deb && \
14
- rm /tmp/google-chrome-stable_current_amd64.deb
15
-
16
- # Install vnc server and noVNC
 
 
 
 
17
  RUN \
18
- apt install --no-install-recommends -y tightvncserver xfonts-base git websockify python3 net-tools procps && \
19
- git clone https://github.com/novnc/noVNC.git /opt/novnc
 
 
20
 
21
- # Configuration
22
  COPY chrome-novnc.sh /usr/bin/chrome-novnc.sh
23
  RUN \
24
- ln -s /opt/novnc/vnc.html /opt/novnc/index.html && \
25
- chmod +x /usr/bin/chrome-novnc.sh
26
 
 
27
  ENV \
28
- WIDTH=1280 \
29
- HEIGHT=720 \
30
- LANGUAGE=zh_CN.UTF-8 \
31
- VNC_PASSWD=Binhminh12
32
-
 
 
 
33
  EXPOSE 7860
34
 
35
  VOLUME /config
36
 
37
- # Clean
38
  RUN \
39
- apt purge -y git && \
40
- apt autoremove --purge -y && \
41
- rm -rf /var/lib/apt/lists/*
42
 
43
  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.1"
5
 
6
  # Install Chrome
7
  RUN \
8
+ apt update && \
9
+ apt upgrade -y && \
10
+ apt install --no-install-recommends -y wget fonts-droid-fallback && \
11
+ wget --no-check-certificate https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/google-chrome-stable_current_amd64.deb && \
12
+ apt install --no-install-recommends -f -y /tmp/google-chrome-stable_current_amd64.deb && \
13
+ rm /tmp/google-chrome-stable_current_amd64.deb
14
+
15
+ # Install VNC server and noVNC
16
+ 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
+ # Create directories and set permissions for non-root user
21
  RUN \
22
+ mkdir -p /config/google-chrome /config/.vnc && \
23
+ chmod -R 777 /config /opt/novnc && \
24
+ touch /config/.vnc/passwd /config/.vnc/xstartup && \
25
+ chmod 666 /config/.vnc/passwd /config/.vnc/xstartup
26
 
27
+ # Copy and configure chrome-novnc.sh
28
  COPY chrome-novnc.sh /usr/bin/chrome-novnc.sh
29
  RUN \
30
+ ln -s /opt/novnc/vnc.html /opt/novnc/index.html && \
31
+ chmod +x /usr/bin/chrome-novnc.sh
32
 
33
+ # Environment variables
34
  ENV \
35
+ WIDTH=1280 \
36
+ HEIGHT=720 \
37
+ LANGUAGE=zh_CN.UTF-8 \
38
+ VNC_PASSWD=Binhminh12 \
39
+ HOME=/config \
40
+ XDG_CONFIG_HOME=/config \
41
+ VNC_DIR=/config/.vnc
42
+
43
  EXPOSE 7860
44
 
45
  VOLUME /config
46
 
47
+ # Clean up
48
  RUN \
49
+ apt purge -y git && \
50
+ apt autoremove --purge -y && \
51
+ rm -rf /var/lib/apt/lists/*
52
 
53
  CMD ["bash", "-c", "/usr/bin/chrome-novnc.sh"]