1tbfree commited on
Commit
7283005
·
verified ·
1 Parent(s): 88002f3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -3,9 +3,10 @@ FROM ubuntu:latest
3
  # Update package lists and install dependencies
4
  ENV SUDO_FORCE_REMOVE=yes
5
  RUN apt-get update && \
6
- apt-get install -y software-properties-common curl git && \
7
  add-apt-repository ppa:deadsnakes/ppa -y
8
-
 
9
  # Install Node.js
10
  RUN apt-get install -y nodejs npm neofetch sudo
11
  RUN echo "ubuntu ALL=(ALL) NOPASSWD: /usr/bin/apt, /usr/bin/apt-get, /usr/bin/dpkg" > /etc/sudoers.d/ubuntu && chmod 440 /etc/sudoers.d/ubuntu
@@ -24,5 +25,5 @@ COPY . .
24
  # Expose the port
25
  EXPOSE 7860
26
  # Run the application
27
- USER root
28
  CMD ["node", "server.js"]
 
3
  # Update package lists and install dependencies
4
  ENV SUDO_FORCE_REMOVE=yes
5
  RUN apt-get update && \
6
+ apt-get install -y software-properties-common adduser curl git && \
7
  add-apt-repository ppa:deadsnakes/ppa -y
8
+ RUN adduser user
9
+ RUN adduser user sudo
10
  # Install Node.js
11
  RUN apt-get install -y nodejs npm neofetch sudo
12
  RUN echo "ubuntu ALL=(ALL) NOPASSWD: /usr/bin/apt, /usr/bin/apt-get, /usr/bin/dpkg" > /etc/sudoers.d/ubuntu && chmod 440 /etc/sudoers.d/ubuntu
 
25
  # Expose the port
26
  EXPOSE 7860
27
  # Run the application
28
+ USER user
29
  CMD ["node", "server.js"]