Update Dockerfile
Browse files- Dockerfile +7 -0
Dockerfile
CHANGED
@@ -4,6 +4,13 @@ FROM python:3.11.3-slim
|
|
4 |
# Set the working directory within the container
|
5 |
WORKDIR /app
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Copy the .env file containing the API Key into the container
|
8 |
COPY ./.env /app/.env
|
9 |
|
|
|
4 |
# Set the working directory within the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Create a non-root user and set appropriate permissions
|
8 |
+
RUN adduser --disabled-password --gecos '' myuser
|
9 |
+
RUN chown -R myuser:myuser /app
|
10 |
+
|
11 |
+
# Switch to the non-root user
|
12 |
+
USER myuser
|
13 |
+
|
14 |
# Copy the .env file containing the API Key into the container
|
15 |
COPY ./.env /app/.env
|
16 |
|