Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
|
@@ -4,9 +4,6 @@ FROM python:3.9-slim as build-stage
|
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install build dependencies (only if needed, otherwise skip this stage)
|
| 8 |
-
# RUN apt-get update && apt-get install -y build-essential gcc
|
| 9 |
-
|
| 10 |
# Copy requirements file
|
| 11 |
COPY requirements.txt .
|
| 12 |
|
|
@@ -26,6 +23,9 @@ COPY --from=build-stage /usr/local/bin /usr/local/bin
|
|
| 26 |
# Copy application code
|
| 27 |
COPY . /app
|
| 28 |
|
|
|
|
|
|
|
|
|
|
| 29 |
# Remove pip cache and unnecessary files (optional)
|
| 30 |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
| 31 |
|
|
|
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
# Copy requirements file
|
| 8 |
COPY requirements.txt .
|
| 9 |
|
|
|
|
| 23 |
# Copy application code
|
| 24 |
COPY . /app
|
| 25 |
|
| 26 |
+
# Change ownership of /app to flaskuser
|
| 27 |
+
RUN chown -R flaskuser:flaskuser /app
|
| 28 |
+
|
| 29 |
# Remove pip cache and unnecessary files (optional)
|
| 30 |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
| 31 |
|