Samuel Oberhofer commited on
Commit
8b9c52d
·
1 Parent(s): 43b9b0c

fix: Restructure Dockerfile to correct permissions

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -8
Dockerfile CHANGED
@@ -7,8 +7,11 @@ RUN useradd -m -u 1000 user
7
  # Set the working directory
8
  WORKDIR /app
9
 
10
- # Copy the requirements file
11
- COPY --chown=user:user requirements.txt .
 
 
 
12
 
13
  # Switch to the non-root user
14
  USER user
@@ -16,12 +19,6 @@ USER user
16
  # Install dependencies
17
  RUN pip install --user -r requirements.txt
18
 
19
- # Copy the rest of the application files
20
- COPY --chown=user:user . .
21
-
22
- # Grant ownership of the app directory to the user
23
- RUN chown -R user:user /app
24
-
25
  # Make the startup script executable
26
  RUN chmod +x startup.sh
27
 
 
7
  # Set the working directory
8
  WORKDIR /app
9
 
10
+ # Copy all application files
11
+ COPY . .
12
+
13
+ # Grant ownership of the app directory to the user
14
+ RUN chown -R user:user /app
15
 
16
  # Switch to the non-root user
17
  USER user
 
19
  # Install dependencies
20
  RUN pip install --user -r requirements.txt
21
 
 
 
 
 
 
 
22
  # Make the startup script executable
23
  RUN chmod +x startup.sh
24