cotcotquedec commited on
Commit
0e6018e
·
1 Parent(s): 0fb809c

chore(docker): set default user to non-root in Dockerfile

Browse files

Updated the Dockerfile to set the default user to a non-root user for improved security practices. This change ensures that the application runs with limited privileges, reducing potential risks.

Additionally, renamed `app.py` to `main.py` to better reflect its role as the main entry point of the FastAPI application.

Files changed (2) hide show
  1. Dockerfile +1 -0
  2. app.py → main.py +0 -0
Dockerfile CHANGED
@@ -24,6 +24,7 @@ COPY --chown=user . /app
24
 
25
  # Document the port that the application will listen on
26
  EXPOSE 9099
 
27
 
28
  # Define the command to run the FastAPI application using uvicorn
29
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "9099"]
 
24
 
25
  # Document the port that the application will listen on
26
  EXPOSE 9099
27
+ USER user
28
 
29
  # Define the command to run the FastAPI application using uvicorn
30
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "9099"]
app.py → main.py RENAMED
File without changes