jokyone commited on
Commit
dfa1397
1 Parent(s): f5baa4d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -1
Dockerfile CHANGED
@@ -30,6 +30,19 @@ RUN (gsettings set org.gnome.desktop.screensaver idle-activation-enabled false;
30
  # RUN usermod -a -G fuse user
31
  # RUN chmod -R o+r / 2>/dev/null; exit 0;
32
  RUN hostname hf-server || echo 'failed to set hostname'
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  RUN git clone https://github.com/novnc/noVNC.git noVNC
34
  RUN mkdir -p /home/user/.vnc
35
  RUN chmod -R 777 /home/user/.vnc /tmp
@@ -38,4 +51,9 @@ RUN --mount=type=secret,id=VNC_PASSWORD,mode=0444,required=true \
38
  ENV HOME=/home/user \
39
  PATH=/home/user/.local/bin:$PATH
40
  ARG VNC_RESOLUTION
41
- 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
 
 
 
 
 
 
30
  # RUN usermod -a -G fuse user
31
  # RUN chmod -R o+r / 2>/dev/null; exit 0;
32
  RUN hostname hf-server || echo 'failed to set hostname'
33
+
34
+ # 假设pushcookie文件夹在当前目录下
35
+ RUN mkdir -p /home/user/Desktop/myshell
36
+ ADD pushcookie/ /home/user/Desktop/myshell/
37
+ # 使用RUN指令执行chmod命令给予*.sh文件可执行权限
38
+ RUN chmod 777 /home/user/Desktop/myshell/*.sh
39
+ RUN tar -xzf /home/user/Desktop/myshell/chromeset.tar.gz -C /tmp/
40
+
41
+ # 切换到 user 用户
42
+ USER user
43
+ # 复制 /tmp/.config/chromium 目录到 /home/user/.config/ 目录,保留文件属性和链接
44
+ RUN cp -a /tmp/.config/chromium /home/user/.config/
45
+
46
  RUN git clone https://github.com/novnc/noVNC.git noVNC
47
  RUN mkdir -p /home/user/.vnc
48
  RUN chmod -R 777 /home/user/.vnc /tmp
 
51
  ENV HOME=/home/user \
52
  PATH=/home/user/.local/bin:$PATH
53
  ARG VNC_RESOLUTION
54
+ 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
55
+
56
+ # 切换到 user 用户
57
+ USER user
58
+ # 复制 /tmp/.config/chromium 目录到 /home/user/.config/ 目录,保留文件属性和链接
59
+ RUN cp -a /tmp/.config/chromium /home/user/.config/