ehfd 4 年之前
父节点
当前提交
4f5a2da6c5
共有 2 个文件被更改,包括 5 次插入6 次删除
  1. 5 5
      Dockerfile
  2. 0 1
      bootstrap.sh

+ 5 - 5
Dockerfile

@@ -142,11 +142,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 
 RUN sed -i "s/allowed_users=console/allowed_users=anybody/;$ a needs_root_rights=yes" /etc/X11/Xwrapper.config
 
-COPY bootstrap.sh /bootstrap.sh
-RUN chmod 755 /bootstrap.sh
-COPY supervisord.conf /etc/supervisord.conf
-RUN chmod 755 /etc/supervisord.conf
-
 # Create user with password ${VNCPASS}
 RUN apt-get update && apt-get install -y --no-install-recommends \
         sudo && \
@@ -158,6 +153,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
     chown -R user:user /home/user && \
     echo "user:${VNCPASS}" | chpasswd
 
+COPY bootstrap.sh /bootstrap.sh
+RUN chmod 755 /bootstrap.sh
+COPY supervisord.conf /etc/supervisord.conf
+RUN chmod 755 /etc/supervisord.conf
+
 EXPOSE 5901
 
 USER user

+ 0 - 1
bootstrap.sh

@@ -3,7 +3,6 @@ set -e
 
 trap "echo TRAPed signal" HUP INT QUIT KILL TERM
 
-sudo chown -R user:user ~
 echo "user:${VNCPASS}" | sudo chpasswd
 
 # NVIDIA driver version inside the container from Dockerfile must be equal to the host