mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2025-06-05 04:43:44 +02:00
commit
7155d20913
1 changed files with 6 additions and 12 deletions
18
Dockerfile
18
Dockerfile
|
@ -5,16 +5,10 @@ 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:3.15 as awg-tools
|
FROM alpine:3.19
|
||||||
ARG AWGTOOLS_RELEASE="1.0.20231215"
|
ARG AWGTOOLS_RELEASE="1.0.20240202"
|
||||||
RUN apk --no-cache add linux-headers build-base bash && \
|
RUN apk --no-cache add iproute2 bash && \
|
||||||
wget https://github.com/amnezia-vpn/amneziawg-tools/archive/refs/tags/v${AWGTOOLS_RELEASE}.zip && \
|
wget https://github.com/amnezia-vpn/amneziawg-tools/releases/download/v${AWGTOOLS_RELEASE}/alpine-3.19-amneziawg-tools.zip && \
|
||||||
unzip v${AWGTOOLS_RELEASE}.zip && \
|
unzip alpine-3.19-amneziawg-tools.zip -d /usr/bin/ && \
|
||||||
cd amneziawg-tools-${AWGTOOLS_RELEASE}/src && \
|
chmod +x /usr/bin/wg /usr/bin/wg-quick
|
||||||
make -e LDFLAGS=-static && \
|
|
||||||
make install
|
|
||||||
|
|
||||||
FROM alpine:3.15
|
|
||||||
RUN apk --no-cache add iproute2 bash
|
|
||||||
COPY --from=awg /usr/bin/amneziawg-go /usr/bin/amneziawg-go
|
COPY --from=awg /usr/bin/amneziawg-go /usr/bin/amneziawg-go
|
||||||
COPY --from=awg-tools /usr/bin/awg /usr/bin/awg-quick /usr/bin/
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue