Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
# Create a user with home directory
|
| 4 |
RUN useradd -m -u 1000 user
|
| 5 |
|
| 6 |
# Set environment variables
|
| 7 |
ENV HOME=/home/user
|
| 8 |
|
| 9 |
-
# Switch to
|
| 10 |
USER user
|
| 11 |
|
| 12 |
# Set working directory to /app
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
-
# Install git
|
| 16 |
-
RUN apt-get update && apt-get install -y git
|
| 17 |
-
|
| 18 |
# Use the GIT_REPO argument from Hugging Face Secrets
|
| 19 |
ARG GIT_REPO
|
| 20 |
ENV GIT_REPO=${GIT_REPO}
|
|
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
| 3 |
+
# Install git as root
|
| 4 |
+
RUN apt-get update && apt-get install -y git
|
| 5 |
+
|
| 6 |
# Create a user with home directory
|
| 7 |
RUN useradd -m -u 1000 user
|
| 8 |
|
| 9 |
# Set environment variables
|
| 10 |
ENV HOME=/home/user
|
| 11 |
|
| 12 |
+
# Switch to non-root user
|
| 13 |
USER user
|
| 14 |
|
| 15 |
# Set working directory to /app
|
| 16 |
WORKDIR /app
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
# Use the GIT_REPO argument from Hugging Face Secrets
|
| 19 |
ARG GIT_REPO
|
| 20 |
ENV GIT_REPO=${GIT_REPO}
|