mn9206986 commited on
Commit
5a4970d
·
verified ·
1 Parent(s): 3d4f810

Update supervisord.conf

Browse files
Files changed (1) hide show
  1. supervisord.conf +41 -37
supervisord.conf CHANGED
@@ -1,37 +1,41 @@
1
- [supervisord]
2
- nodaemon=true
3
- logfile=/dev/null
4
- logfile_maxbytes=0
5
- pidfile=/tmp/supervisord.pid
6
- user=1000
7
-
8
- [program:xvfb]
9
- command=Xvfb :0 -screen 0 %(ENV_RESOLUTION)s
10
- autorestart=true
11
- priority=100
12
- user=1000
13
-
14
- [program:fluxbox]
15
- command=fluxbox
16
- autorestart=true
17
- priority=150
18
- user=1000
19
-
20
- [program:x11vnc]
21
- command=x11vnc -display :0 -forever -shared -noxdamage
22
- autorestart=true
23
- priority=175
24
- user=1000
25
-
26
- [program:chromium]
27
- command=chromium-browser --no-sandbox --disable-gpu --disable-dev-shm-usage --start-maximized
28
- environment=DISPLAY=":0",HOME="/home/user"
29
- autorestart=true
30
- priority=200
31
- user=1000
32
-
33
- [program:novnc]
34
- command=/usr/share/novnc/utils/launch.sh --vnc localhost:5900 --listen %(ENV_PORT)s
35
- autorestart=true
36
- priority=300
37
- user=1000
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive \
4
+ TZ=Etc/UTC \
5
+ DISPLAY=:0 \
6
+ RESOLUTION=1920x1080x24 \
7
+ PORT=7860
8
+
9
+ # Cài đặt dependencies
10
+ RUN apt-get update && apt-get install -y \
11
+ xvfb \
12
+ novnc \
13
+ websockify \
14
+ supervisor \
15
+ chromium-browser \
16
+ fluxbox \
17
+ x11vnc \
18
+ && rm -rf /var/lib/apt/lists/*
19
+
20
+ # Cấu hình noVNC
21
+ RUN mkdir -p /usr/share/novnc/utils/websockify && \
22
+ ln -s /usr/share/novnc/vnc.html /usr/share/novnc/index.html
23
+
24
+ # Chuẩn bị môi trường cho user 1000
25
+ RUN mkdir -p /home/user && \
26
+ chown -R 1000:1000 /home/user && \
27
+ mkdir -p /home/user/.config/chromium && \
28
+ chown -R 1000:1000 /home/user/.config
29
+
30
+ # Sửa PID file location cho non-root
31
+ RUN sed -i 's/\/var\/run/\/tmp/g' /etc/supervisor/supervisord.conf
32
+
33
+ # Copy cấu hình supervisor
34
+ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
35
+ RUN chown 1000:1000 /etc/supervisor/conf.d/supervisord.conf
36
+
37
+ EXPOSE 7860
38
+
39
+ USER 1000
40
+
41
+ CMD ["/usr/bin/supervisord", "-n"]