Update Dockerfile
Browse files- Dockerfile +3 -5
Dockerfile
CHANGED
|
@@ -1,19 +1,17 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 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
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
# Copy requirements and install dependencies
|
| 12 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 14 |
|
| 15 |
-
# Copy the rest of your application code
|
| 16 |
COPY --chown=user . /app
|
| 17 |
|
| 18 |
-
# Command to run your Flask app
|
| 19 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
+
# Install the missing system dependency
|
| 4 |
+
RUN apt-get update && apt-get install -y libgl1-mesa-glx
|
| 5 |
+
|
| 6 |
RUN useradd -m -u 1000 user
|
| 7 |
USER user
|
| 8 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 9 |
|
|
|
|
| 10 |
WORKDIR /app
|
| 11 |
|
|
|
|
| 12 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 14 |
|
|
|
|
| 15 |
COPY --chown=user . /app
|
| 16 |
|
|
|
|
| 17 |
CMD ["python", "app.py"]
|