mn9206986 commited on
Commit
f690290
·
verified ·
1 Parent(s): ad206aa

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -25
Dockerfile CHANGED
@@ -1,14 +1,14 @@
1
  FROM alpine:3.19.1
2
 
3
- LABEL AboutImage="Alpine_Chromium_NoVNC_HF"
4
- LABEL Maintainer="Minh"
5
 
6
  ENV VNC_PASS="CHANGE_IT" \
7
  VNC_TITLE="Chromium" \
8
  VNC_RESOLUTION="1280x720" \
9
  VNC_SHARED=false \
10
  DISPLAY=:0 \
11
- NOVNC_PORT=7860 \
12
  PORT=7860 \
13
  NO_SLEEP=false \
14
  LANG=en_US.UTF-8 \
@@ -16,31 +16,26 @@ ENV VNC_PASS="CHANGE_IT" \
16
  LC_ALL=C.UTF-8 \
17
  TZ="Asia/Kolkata"
18
 
19
- # Tạo folder log cấp quyền để supervisord không bị PermissionError
20
- RUN mkdir -p /var/log && chmod 777 /var/log \
21
- && mkdir -p /config
 
 
 
 
22
 
23
- # Cài các gói cần thiết
24
- RUN apk update && apk add --no-cache \
25
- tzdata ca-certificates supervisor bash python3 py3-pip sed unzip \
26
- xvfb x11vnc websockify openbox chromium nss alsa-lib \
27
- font-noto font-noto-cjk git \
28
- && cp /usr/share/zoneinfo/$TZ /etc/localtime \
29
- && echo $TZ > /etc/timezone \
30
- && pip install --no-cache-dir torch torchvision transformers diffusers accelerate
31
-
32
- # Clone repo chrome-novnc và copy assets
33
- RUN git clone https://github.com/vital987/chrome-novnc.git /tmp/chrome-novnc \
34
- && cp -r /tmp/chrome-novnc/assets/* / \
35
- && rm -rf /tmp/chrome-novnc
36
-
37
- # Tạo chứng chỉ SSL cho noVNC
38
  RUN openssl req -new -newkey rsa:4096 -days 36500 -nodes -x509 \
39
- -subj "/C=IN/O=Dis/CN=www.google.com" \
40
- -keyout /etc/ssl/novnc.key -out /etc/ssl/novnc.cert > /dev/null 2>&1
 
 
 
 
 
 
41
 
42
- # Copy file supervisord.conf từ repo assets (nếu cần tuỳ chỉnh thì để trong /config)
43
- COPY supervisord.conf /config/supervisord.conf
44
 
45
  ENTRYPOINT ["supervisord", "-l", "/var/log/supervisord.log", "-c"]
46
  CMD ["/config/supervisord.conf"]
 
1
  FROM alpine:3.19.1
2
 
3
+ LABEL AboutImage "Alpine_Chromium_NoVNC"
4
+ LABEL Maintainer "Apurv Vyavahare <apurvvyavahare@gmail.com>"
5
 
6
  ENV VNC_PASS="CHANGE_IT" \
7
  VNC_TITLE="Chromium" \
8
  VNC_RESOLUTION="1280x720" \
9
  VNC_SHARED=false \
10
  DISPLAY=:0 \
11
+ NOVNC_PORT=$PORT \
12
  PORT=7860 \
13
  NO_SLEEP=false \
14
  LANG=en_US.UTF-8 \
 
16
  LC_ALL=C.UTF-8 \
17
  TZ="Asia/Kolkata"
18
 
19
+ RUN mkdir -p /config/supervisor /var/log && \
20
+ apk update && apk add --no-cache \
21
+ tzdata ca-certificates supervisor bash python3 py3-pip sed unzip \
22
+ xvfb x11vnc websockify openbox chromium nss alsa-lib \
23
+ font-noto font-noto-cjk git && \
24
+ cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
25
+ pip install --no-cache-dir torch torchvision transformers diffusers accelerate
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  RUN openssl req -new -newkey rsa:4096 -days 36500 -nodes -x509 \
28
+ -subj "/C=IN/O=Dis/CN=www.google.com" \
29
+ -keyout /etc/ssl/novnc.key -out /etc/ssl/novnc.cert > /dev/null 2>&1
30
+
31
+ # Clone repo chrome-novnc, copy assets + chính supervisord.conf
32
+ RUN git clone https://github.com/vital987/chrome-novnc.git /tmp/chrome-novnc && \
33
+ cp -r /tmp/chrome-novnc/assets/* / && \
34
+ cp /tmp/chrome-novnc/assets/config/supervisord.conf /config/supervisord.conf && \
35
+ rm -rf /tmp/chrome-novnc
36
 
37
+ # Tạo file log supervisor quyền ghi
38
+ RUN touch /var/log/supervisord.log && chmod 666 /var/log/supervisord.log
39
 
40
  ENTRYPOINT ["supervisord", "-l", "/var/log/supervisord.log", "-c"]
41
  CMD ["/config/supervisord.conf"]