Skip to content

Commit

Permalink
Merge pull request #14 from amnezia-vpn/docker
Browse files Browse the repository at this point in the history
Update Dockerfile
  • Loading branch information
tiaga authored Feb 2, 2024
2 parents e3c9ec8 + bfeb395 commit 7155d20
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

0 comments on commit 7155d20

Please sign in to comment.