Spaces:
Running
Running
tuts4y0u
commited on
Commit
•
68301ae
1
Parent(s):
a55419a
Update Dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -3,7 +3,7 @@ RUN chown root:shadow /etc/shadow; chmod 640 /etc/shadow;
|
|
3 |
RUN chmod 2755 /sbin/unix_chkpwd || echo "文件不存在,无视"
|
4 |
RUN useradd -d /home/user -s /bin/bash -m -u 1000 user
|
5 |
RUN chown user -R /home/user; echo "cd ~" > /home/user/.bashrc;
|
6 |
-
RUN
|
7 |
echo 'user:$(cat /run/secrets/VNC_PASSWORD)' | chpasswd
|
8 |
RUN pwconv
|
9 |
RUN apt update
|
@@ -14,9 +14,9 @@ RUN sed -i '/@xscreensaver -no-splash/d' /etc/xdg/lxsession/LXDE/autostart || ec
|
|
14 |
RUN git clone https://github.com/novnc/noVNC.git noVNC
|
15 |
RUN mkdir -p /home/user/.vnc
|
16 |
RUN chmod -R 777 /home/user/.vnc /tmp
|
17 |
-
RUN
|
18 |
cat /run/secrets/VNC_PASSWORD | vncpasswd -f > /home/user/.vnc/passwd
|
19 |
ENV HOME=/home/user \
|
20 |
PATH=/home/user/.local/bin:$PATH
|
21 |
ARG VNC_RESOLUTION
|
22 |
-
CMD vncserver
|
|
|
3 |
RUN chmod 2755 /sbin/unix_chkpwd || echo "文件不存在,无视"
|
4 |
RUN useradd -d /home/user -s /bin/bash -m -u 1000 user
|
5 |
RUN chown user -R /home/user; echo "cd ~" > /home/user/.bashrc;
|
6 |
+
RUN --mount=type=secret,id=VNC_PASSWORD,mode=0444,required=true \
|
7 |
echo 'user:$(cat /run/secrets/VNC_PASSWORD)' | chpasswd
|
8 |
RUN pwconv
|
9 |
RUN apt update
|
|
|
14 |
RUN git clone https://github.com/novnc/noVNC.git noVNC
|
15 |
RUN mkdir -p /home/user/.vnc
|
16 |
RUN chmod -R 777 /home/user/.vnc /tmp
|
17 |
+
RUN --mount=type=secret,id=VNC_PASSWORD,mode=0444,required=true \
|
18 |
cat /run/secrets/VNC_PASSWORD | vncpasswd -f > /home/user/.vnc/passwd
|
19 |
ENV HOME=/home/user \
|
20 |
PATH=/home/user/.local/bin:$PATH
|
21 |
ARG VNC_RESOLUTION
|
22 |
+
CMD vncserver -SecurityTypes VncAuth -rfbauth /home/user/.vnc/passwd -geometry $VNC_RESOLUTION && ./noVNC/utils/novnc_proxy --vnc localhost:5901 --listen 0.0.0.0:7860
|