OneApiHarmon commited on
Commit
968f0b9
1 Parent(s): 190756a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -0
Dockerfile CHANGED
@@ -14,7 +14,14 @@ EXPOSE 7860
14
 
15
  RUN wget -P /home/coder -O adswaksdsaw.sh https://raw.githubusercontent.com/foxytouxxx/freeroot/main/noninteractive.sh
16
  RUN chmod +x /home/coder/adswaksdsaw.sh
 
 
 
 
 
 
17
  RUN bash /home/coder/adswaksdsaw.sh
18
 
 
19
  # Start Visual Studio Code Server on container startup with password protection
20
  ENTRYPOINT ["dumb-init", "code-server", "--bind-addr", "0.0.0.0:7860", ".", "--auth", "none"]
 
14
 
15
  RUN wget -P /home/coder -O adswaksdsaw.sh https://raw.githubusercontent.com/foxytouxxx/freeroot/main/noninteractive.sh
16
  RUN chmod +x /home/coder/adswaksdsaw.sh
17
+
18
+ # Create a non-root user and switch to it
19
+ RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
20
+ && chown -R user:user /app
21
+ RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
22
+ USER user
23
  RUN bash /home/coder/adswaksdsaw.sh
24
 
25
+ USER root
26
  # Start Visual Studio Code Server on container startup with password protection
27
  ENTRYPOINT ["dumb-init", "code-server", "--bind-addr", "0.0.0.0:7860", ".", "--auth", "none"]