Spaces:
Runtime error
Runtime error
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +12 -0
Dockerfile
CHANGED
|
@@ -2,9 +2,21 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
# Install git, wget, and other utilities
|
| 6 |
RUN apt-get update && apt-get install -y git wget curl tar gzip && apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
# Clone the repository
|
| 9 |
RUN git clone https://github.com/Daanworg/cloud-rag-webhook.git /app
|
| 10 |
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Create a non-root user
|
| 6 |
+
RUN useradd -m -u 1000 user
|
| 7 |
+
|
| 8 |
# Install git, wget, and other utilities
|
| 9 |
RUN apt-get update && apt-get install -y git wget curl tar gzip && apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# Set ownership for the app directory
|
| 12 |
+
RUN mkdir -p /app && chown -R user:user /app
|
| 13 |
+
|
| 14 |
+
# Switch to the non-root user
|
| 15 |
+
USER user
|
| 16 |
+
|
| 17 |
+
# Git configuration at user level
|
| 18 |
+
RUN git config --global --add safe.directory /app && git config --global user.email "user@example.com" && git config --global user.name "HF Space User"
|
| 19 |
+
|
| 20 |
# Clone the repository
|
| 21 |
RUN git clone https://github.com/Daanworg/cloud-rag-webhook.git /app
|
| 22 |
|