mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-07-28 09:22:22 +00:00
commit
85d1cc8be4
@ -1,24 +1,30 @@
|
|||||||
FROM golang:1.24 AS awg
|
FROM golang:1.24 AS awg-go
|
||||||
|
|
||||||
RUN git clone https://github.com/amnezia-vpn/amneziawg-go /awg
|
RUN git clone https://github.com/WGDashboard/amneziawg-go /awg
|
||||||
WORKDIR /awg
|
WORKDIR /awg
|
||||||
RUN go mod download && \
|
RUN go mod download && \
|
||||||
go mod verify && \
|
go mod verify && \
|
||||||
go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin
|
go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin
|
||||||
|
|
||||||
|
FROM alpine:latest AS awg-tools
|
||||||
|
|
||||||
|
RUN apk update && apk add --no-cache \
|
||||||
|
make git build-base linux-headers \
|
||||||
|
&& git clone https://github.com/WGDashboard/amneziawg-tools \
|
||||||
|
&& cd amneziawg-tools/src \
|
||||||
|
&& make \
|
||||||
|
&& chmod +x wg*
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
LABEL maintainer="dselen@nerthus.nl"
|
LABEL maintainer="dselen@nerthus.nl"
|
||||||
|
|
||||||
RUN apk update && apk add \
|
RUN apk update && apk add --no-cache \
|
||||||
iproute2 iptables bash curl wget unzip procps sudo \
|
iproute2 iptables bash curl wget unzip procps sudo \
|
||||||
tzdata wireguard-tools python3 py3-psutil py3-bcrypt openresolv \
|
tzdata wireguard-tools python3 py3-psutil py3-bcrypt openresolv
|
||||||
&& cd /usr/bin/ \
|
|
||||||
&& wget $(curl -s https://api.github.com/repos/amnezia-vpn/amneziawg-tools/releases/latest | grep 'alpine' | cut -d : -f 2,3 | tr -d '", ' | tail -n 1) \
|
|
||||||
&& unzip -j alpine-3.19-amneziawg-tools.zip \
|
|
||||||
&& chmod +x /usr/bin/awg /usr/bin/awg-quick \
|
|
||||||
&& rm alpine-3.19-amneziawg-tools.zip
|
|
||||||
|
|
||||||
COPY --from=awg /usr/bin/amneziawg-go /usr/bin/amneziawg-go
|
COPY --from=awg-go /usr/bin/amneziawg-go /usr/bin/amneziawg-go
|
||||||
|
COPY --from=awg-tools /amneziawg-tools/src/wg /usr/bin/awg
|
||||||
|
COPY --from=awg-tools /amneziawg-tools/src/wg-quick/linux.bash /usr/bin/awg-quick
|
||||||
|
|
||||||
# Declaring environment variables, change Peernet to an address you like, standard is a 24 bit subnet.
|
# Declaring environment variables, change Peernet to an address you like, standard is a 24 bit subnet.
|
||||||
ARG wg_net="10.0.0.1" \
|
ARG wg_net="10.0.0.1" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user