vboxuser commited on
Commit
bd1046f
·
1 Parent(s): 6ef5e2a

give the permission to user

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -4,8 +4,8 @@ FROM python:3.9
4
  RUN groupadd -r myapp && useradd -r -g myapp -u 1000 myapp
5
 
6
  # Create the working directory and set the ownership to the new user and group
7
- RUN mkdir /code && chown myapp:myapp /code
8
- WORKDIR /code
9
 
10
  # Install system dependencies
11
  RUN apt-get update && apt-get install -y libgl1 ffmpeg libsm6 libxext6
@@ -16,7 +16,8 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
 
17
  # Copy the rest of the code and set the ownership to the new user and group
18
  COPY . .
19
- RUN chown -R myapp:myapp .
 
20
 
21
  # Switch to the new user
22
  USER myapp
 
4
  RUN groupadd -r myapp && useradd -r -g myapp -u 1000 myapp
5
 
6
  # Create the working directory and set the ownership to the new user and group
7
+ RUN mkdir /app && chown myapp:myapp /app
8
+ WORKDIR /app
9
 
10
  # Install system dependencies
11
  RUN apt-get update && apt-get install -y libgl1 ffmpeg libsm6 libxext6
 
16
 
17
  # Copy the rest of the code and set the ownership to the new user and group
18
  COPY . .
19
+ RUN chmod a+rwx /home/myapp
20
+
21
 
22
  # Switch to the new user
23
  USER myapp