oulh commited on
Commit
723e756
1 Parent(s): 3e19bbe

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -8,6 +8,12 @@ apt install -y curl bash-completion wget vim net-tools lsof nginx htop && \
8
  # echo "leo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
9
  chown -R leo:leo /bin /sbin/ /media /mnt /opt /usr /var /tmp /run /home
10
  RUN curl -fsSL https://raw.githubusercontent.com/cdr/code-server/main/install.sh | sh
 
 
 
 
 
 
11
  USER leo
12
  ENV HOME=/home/leo \
13
  PATH=/home/leo/.local/bin:$PATH
@@ -23,11 +29,7 @@ EXPOSE 8080
23
  # RUN chmod +x /root/startup.sh
24
 
25
  # RUN mkdir /.config && chmod -R 777 /.config && mkdir /.local && chmod -R 777 /.local
26
- # 引入设置中创建的secret变量
27
- RUN --mount=type=secret,id=password,mode=0444,required=true cat /run/secrets/password > /run/passwd
28
- # RUN ls /.config/ && cat /.config/code-server/config.yaml
29
- COPY ./config.yaml /home/leo/.config/code-server/config.yaml
30
- RUN sed -i 's/psaaword:/password: $(cat \/run\/passwd)/' /home/leo/.config/code-server/config.yaml
31
  CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--config", "/home/leo/.config/code-server/config.yaml"]
32
  # CMD code-server --help
33
  # code-server项目仓库:https://github.com/cdr/code-server
 
8
  # echo "leo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
9
  chown -R leo:leo /bin /sbin/ /media /mnt /opt /usr /var /tmp /run /home
10
  RUN curl -fsSL https://raw.githubusercontent.com/cdr/code-server/main/install.sh | sh
11
+ # 引入设置中创建的secret变量
12
+ RUN --mount=type=secret,id=password,mode=0444,required=true cat /run/secrets/password > /run/passwd
13
+ # RUN ls /.config/ && cat /.config/code-server/config.yaml
14
+ COPY ./config.yaml /home/leo/.config/code-server/config.yaml
15
+ RUN sed -i 's/psaaword:/password: $(cat \/run\/passwd)/' /home/leo/.config/code-server/config.yaml
16
+
17
  USER leo
18
  ENV HOME=/home/leo \
19
  PATH=/home/leo/.local/bin:$PATH
 
29
  # RUN chmod +x /root/startup.sh
30
 
31
  # RUN mkdir /.config && chmod -R 777 /.config && mkdir /.local && chmod -R 777 /.local
32
+
 
 
 
 
33
  CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--config", "/home/leo/.config/code-server/config.yaml"]
34
  # CMD code-server --help
35
  # code-server项目仓库:https://github.com/cdr/code-server