Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +4 -20
Dockerfile
CHANGED
|
@@ -1,29 +1,13 @@
|
|
| 1 |
FROM nikolaik/python-nodejs:python3.10-nodejs19
|
| 2 |
|
| 3 |
-
# Install ffmpeg and clean up apt lists
|
| 4 |
RUN apt-get update \
|
| 5 |
-
&& apt-get install -y --no-install-recommends ffmpeg \
|
| 6 |
&& apt-get clean \
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
-
# Set the working directory
|
| 10 |
-
WORKDIR /app/
|
| 11 |
-
|
| 12 |
-
# Copy your application code
|
| 13 |
COPY . /app/
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
# Install Python dependencies
|
| 16 |
-
RUN pip3 install --no-cache-dir -U -r requirements.txt
|
| 17 |
-
|
| 18 |
-
# --- FIX STARTS HERE ---
|
| 19 |
-
# Create the user (they will be added to 'nogroup' by default)
|
| 20 |
-
RUN adduser --system --no-create-home appuser \
|
| 21 |
-
# Now chown to the user and their default group 'nogroup'
|
| 22 |
-
&& chown -R appuser:nogroup /app/
|
| 23 |
-
# --- FIX ENDS HERE ---
|
| 24 |
-
|
| 25 |
-
# Switch to the non-root user
|
| 26 |
-
USER appuser
|
| 27 |
-
|
| 28 |
-
# Run your application
|
| 29 |
CMD python3 -m Zaid
|
|
|
|
| 1 |
FROM nikolaik/python-nodejs:python3.10-nodejs19
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update \
|
| 4 |
+
&& apt-get install -y --no-install-recommends ffmpeg aria2 \
|
| 5 |
&& apt-get clean \
|
| 6 |
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
COPY . /app/
|
| 9 |
+
WORKDIR /app/
|
| 10 |
+
RUN python -m pip install --no-cache-dir --upgrade pip
|
| 11 |
+
RUN pip3 install --no-cache-dir --upgrade --requirement requirements.txt
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
CMD python3 -m Zaid
|