Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
|
@@ -5,15 +5,16 @@ FROM python:3.10
|
|
| 5 |
ENV PYTHONUNBUFFERED=1
|
| 6 |
ENV PYTHONIOENCODING=utf-8
|
| 7 |
|
|
|
|
| 8 |
# Set working directory
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
# Install dependencies
|
| 12 |
-
COPY requirements.txt .
|
| 13 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
# Copy the app files
|
| 16 |
-
COPY . /app
|
| 17 |
|
| 18 |
# Open the relevant port
|
| 19 |
EXPOSE 7860
|
|
|
|
| 5 |
ENV PYTHONUNBUFFERED=1
|
| 6 |
ENV PYTHONIOENCODING=utf-8
|
| 7 |
|
| 8 |
+
RUN useradd -m -u 1000 user
|
| 9 |
# Set working directory
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
# Install dependencies
|
| 13 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 14 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 15 |
|
| 16 |
# Copy the app files
|
| 17 |
+
COPY --chown=user . /app
|
| 18 |
|
| 19 |
# Open the relevant port
|
| 20 |
EXPOSE 7860
|