Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +12 -3
Dockerfile
CHANGED
|
@@ -2,7 +2,7 @@ FROM ubuntu:22.04
|
|
| 2 |
|
| 3 |
# Install dependencies
|
| 4 |
RUN apt-get update && \
|
| 5 |
-
apt-get install -y curl gnupg lsb-release jq ipcalc
|
| 6 |
|
| 7 |
# Add Cloudflare WARP key and repository
|
| 8 |
RUN curl https://pkg.cloudflareclient.com/pubkey.gpg | gpg --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg && \
|
|
@@ -14,9 +14,18 @@ RUN apt-get update && \
|
|
| 14 |
apt-get clean && \
|
| 15 |
apt-get autoremove -y
|
| 16 |
|
| 17 |
-
# Copy the entrypoint script
|
| 18 |
COPY entrypoint.sh /entrypoint.sh
|
| 19 |
RUN chmod +x /entrypoint.sh
|
| 20 |
|
| 21 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
| 2 |
|
| 3 |
# Install dependencies
|
| 4 |
RUN apt-get update && \
|
| 5 |
+
apt-get install -y curl gnupg lsb-release jq ipcalc
|
| 6 |
|
| 7 |
# Add Cloudflare WARP key and repository
|
| 8 |
RUN curl https://pkg.cloudflareclient.com/pubkey.gpg | gpg --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg && \
|
|
|
|
| 14 |
apt-get clean && \
|
| 15 |
apt-get autoremove -y
|
| 16 |
|
| 17 |
+
# Copy the entrypoint script into the container
|
| 18 |
COPY entrypoint.sh /entrypoint.sh
|
| 19 |
RUN chmod +x /entrypoint.sh
|
| 20 |
|
| 21 |
+
# Create a non-root user (Hugging Face runs containers with user ID 1000 by default)
|
| 22 |
+
RUN useradd -m -s /bin/bash warpuser && \
|
| 23 |
+
chown warpuser:warpuser /entrypoint.sh
|
| 24 |
+
|
| 25 |
+
USER warpuser
|
| 26 |
+
|
| 27 |
+
# Use the non-root user's home directory as the working directory
|
| 28 |
+
WORKDIR /home/warpuser
|
| 29 |
+
|
| 30 |
+
# Run the entrypoint script
|
| 31 |
ENTRYPOINT ["/entrypoint.sh"]
|