github.com/amnezia-vpn/amneziawg-go@v0.2.8/Dockerfile (about)

     1  FROM golang:1.20 as awg
     2  COPY . /awg
     3  WORKDIR /awg
     4  RUN go mod download && \
     5      go mod verify && \
     6      go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin
     7  
     8  FROM alpine:3.19
     9  ARG AWGTOOLS_RELEASE="1.0.20240213"
    10  RUN apk --no-cache add iproute2 iptables bash && \
    11      cd /usr/bin/ && \
    12      wget https://github.com/amnezia-vpn/amneziawg-tools/releases/download/v${AWGTOOLS_RELEASE}/alpine-3.19-amneziawg-tools.zip && \
    13      unzip -j alpine-3.19-amneziawg-tools.zip && \
    14      chmod +x /usr/bin/awg /usr/bin/awg-quick && \
    15      ln -s /usr/bin/awg /usr/bin/wg && \
    16      ln -s /usr/bin/awg-quick /usr/bin/wg-quick
    17  COPY --from=awg /usr/bin/amneziawg-go /usr/bin/amneziawg-go