mirror of https://gitlab.com/fscarmen/test.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
680 B
15 lines
680 B
FROM alpine
|
|
|
|
ENV DIR=/etc/wireguard
|
|
|
|
WORKDIR $DIR
|
|
|
|
RUN apk add --no-cache net-tools iproute2 openresolv wireguard-tools openrc iptables \
|
|
&& rm -rf /var/cache/apk/* \
|
|
&& arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
|
|
&& latest=$(wget -qO- "https://api.github.com/repos/ViRb3/wgcf/releases/latest" | grep "tag_name" | head -n 1 | cut -d : -f2 | sed 's/[ \"v,]//g') \
|
|
&& wget -O wgcf https://github.com/ViRb3/wgcf/releases/download/v$latest/wgcf_"$latest"_linux_$arch \
|
|
&& echo -e "./wgcf register --accept-tos\n./wgcf generate -p wgcf.conf\nrm -rf wgcf-account.toml\nwg-quick up wgcf; sleep 999999h" > run.sh \
|
|
&& chmod +x run.sh wgcf
|
|
|
|
ENTRYPOINT ./run.sh
|
|
|