LoremPizza commited on
Commit
9ad1c9d
·
verified ·
1 Parent(s): fa9ecb9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -5
Dockerfile CHANGED
@@ -4,13 +4,19 @@ FROM ubuntu:22.04
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"]
 
4
  RUN apt-get update && \
5
  apt-get install -y curl wireguard-tools
6
 
7
+ # Download and install WGCF
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
+ chmod +x /usr/local/bin/wgcf
12
 
13
+ # Set environment variable for WGCF
14
+ ENV WGCF_CONFIG_PATH=/etc/wireguard/wgcf.conf
15
 
16
+ # Register and generate WireGuard configuration
17
+ RUN wgcf register && \
18
+ wgcf generate && \
19
+ mv wgcf-profile.conf $WGCF_CONFIG_PATH
20
+
21
+ # Run WireGuard
22
  ENTRYPOINT ["wg-quick", "up", "wgcf"]