Spaces:
Paused
Paused
FROM ubuntu:22.04 | |
# Install necessary packages | |
RUN apt-get update && \ | |
apt-get install -y curl wireguard-tools | |
# Download and install WGCF | |
RUN curl -L https://github.com/ViRb3/wgcf/releases/download/v2.2.11/wgcf_amd64-linux -o wgcf && \ | |
chmod +x wgcf && \ | |
mv wgcf /usr/local/bin/ | |
# Set environment variable for WGCF | |
ENV WGCF_CONFIG_PATH=/etc/wireguard/wgcf.conf | |
# Register and generate WireGuard configuration | |
RUN wgcf register && \ | |
wgcf generate && \ | |
mv wgcf-profile.conf $WGCF_CONFIG_PATH | |
# Run WireGuard | |
ENTRYPOINT ["wg-quick", "up", "wgcf"] | |