marquesafonso commited on
Commit
8706ea8
·
1 Parent(s): 748e637

fix dockerfile user issue

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -1,9 +1,7 @@
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.11.7-slim-bullseye
3
 
4
- RUN useradd -m -u 1000 user
5
- USER user
6
- ENV PATH="/home/user/.local/bin:$PATH"
7
 
8
  # Set the working directory in the container to /app
9
  WORKDIR /app
@@ -21,3 +19,5 @@ EXPOSE 8000
21
 
22
  # Run main.py when the container launches
23
  CMD ["python", "main.py"]
 
 
 
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.11.7-slim-bullseye
3
 
4
+ USER root
 
 
5
 
6
  # Set the working directory in the container to /app
7
  WORKDIR /app
 
19
 
20
  # Run main.py when the container launches
21
  CMD ["python", "main.py"]
22
+
23
+ USER 1001