lavanjv commited on
Commit
8d66d37
·
1 Parent(s): ebf9797

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -0
Dockerfile CHANGED
@@ -4,6 +4,14 @@ FROM python:3.9
4
  # Step 2: Set the working directory inside the container
5
  WORKDIR /app
6
 
 
 
 
 
 
 
 
 
7
  # Step 3: Copy the application files to the container
8
  COPY . /app
9
 
 
4
  # Step 2: Set the working directory inside the container
5
  WORKDIR /app
6
 
7
+ # Create a non-root user
8
+ RUN useradd -ms /bin/bash myuser
9
+
10
+ # Give the user ownership of the working directory and home directory
11
+ RUN chown -R myuser:myuser /app /home/myuser
12
+
13
+ # Switch to the non-root user
14
+ USER myuser
15
  # Step 3: Copy the application files to the container
16
  COPY . /app
17