Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +10 -25
Dockerfile
CHANGED
|
@@ -1,31 +1,16 @@
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
| 3 |
-
# Install
|
| 4 |
RUN apt-get update && \
|
| 5 |
-
apt-get install -y curl
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
RUN curl https://
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
|
| 13 |
-
apt-get install -y cloudflare-warp && \
|
| 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
|
| 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 |
-
#
|
| 31 |
-
ENTRYPOINT ["
|
|
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
| 3 |
+
# Install necessary packages
|
| 4 |
RUN apt-get update && \
|
| 5 |
+
apt-get install -y curl wireguard-tools
|
| 6 |
|
| 7 |
+
# Download WGCF binary
|
| 8 |
+
RUN curl -L https://github.com/ViRb3/wgcf/releases/download/v2.2.11/wgcf_amd64-linux.tar.gz -o wgcf.tar.gz && \
|
| 9 |
+
tar -xzvf wgcf.tar.gz && \
|
| 10 |
+
mv wgcf /usr/local/bin/
|
| 11 |
|
| 12 |
+
# Copy the configuration file into the container
|
| 13 |
+
COPY wgcf-profile.conf /etc/wireguard/wgcf.conf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
# Start WireGuard
|
| 16 |
+
ENTRYPOINT ["wg-quick", "up", "wgcf"]
|