File size: 570 Bytes
4871b23
 
bb71b28
4871b23
bb71b28
4871b23
9ad1c9d
0693c38
 
 
4871b23
9ad1c9d
 
fb16e56
9ad1c9d
 
 
 
 
 
bb71b28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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"]