From bfeb3954f693dc045db4ac8232ee5176152f0d98 Mon Sep 17 00:00:00 2001 From: tiaga Date: Fri, 2 Feb 2024 22:56:00 +0700 Subject: [PATCH] Update Dockerfile - update Alpine version - improve `Dockerfile` to use pre-built AmneziaWG tools --- Dockerfile | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index cbf05b4..136ebc8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,16 +5,10 @@ RUN go mod download && \ go mod verify && \ go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin -FROM alpine:3.15 as awg-tools -ARG AWGTOOLS_RELEASE="1.0.20231215" -RUN apk --no-cache add linux-headers build-base bash && \ - wget https://github.com/amnezia-vpn/amneziawg-tools/archive/refs/tags/v${AWGTOOLS_RELEASE}.zip && \ - unzip v${AWGTOOLS_RELEASE}.zip && \ - cd amneziawg-tools-${AWGTOOLS_RELEASE}/src && \ - make -e LDFLAGS=-static && \ - make install - -FROM alpine:3.15 -RUN apk --no-cache add iproute2 bash +FROM alpine:3.19 +ARG AWGTOOLS_RELEASE="1.0.20240202" +RUN apk --no-cache add iproute2 bash && \ + wget https://github.com/amnezia-vpn/amneziawg-tools/releases/download/v${AWGTOOLS_RELEASE}/alpine-3.19-amneziawg-tools.zip && \ + unzip alpine-3.19-amneziawg-tools.zip -d /usr/bin/ && \ + chmod +x /usr/bin/wg /usr/bin/wg-quick COPY --from=awg /usr/bin/amneziawg-go /usr/bin/amneziawg-go -COPY --from=awg-tools /usr/bin/awg /usr/bin/awg-quick /usr/bin/