Jayra Ortiz commited on
Commit
9e772fb
·
1 Parent(s): dcd924f

changed permission to be for all

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -11
Dockerfile CHANGED
@@ -1,25 +1,22 @@
1
  # Use the official Python base image with tag/version of your choice
2
  FROM python:3.9
3
 
4
- # Set the working directory in the container
 
5
 
6
- ENV WORKDIR=/code
 
 
 
 
7
  WORKDIR ${WORKDIR}
8
 
9
  # Copy the requirements file into the container
10
- COPY requirements.txt .
11
 
12
  # Install the Python dependencies
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- #Permission Settings
16
- RUN useradd -m -u 1000 user
17
- USER user
18
- ENV HOME=/home/user \
19
- PATH=/home/user/.local/bin:$PATH
20
-
21
- WORKDIR $HOME/app
22
-
23
  # Copy the application code into the container
24
  COPY --chown=user . $HOME/app
25
 
 
1
  # Use the official Python base image with tag/version of your choice
2
  FROM python:3.9
3
 
4
+ # Set up a new user named "user" with user ID 1000
5
+ RUN useradd -m -u 1000 user
6
 
7
+ # Switch to the "user" user
8
+ USER user
9
+
10
+ # Set the working directory in the container
11
+ ENV WORKDIR=/app
12
  WORKDIR ${WORKDIR}
13
 
14
  # Copy the requirements file into the container
15
+ COPY --chown=user ./requirements.txt .
16
 
17
  # Install the Python dependencies
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
 
 
 
 
 
 
 
 
20
  # Copy the application code into the container
21
  COPY --chown=user . $HOME/app
22