Docker file update

This commit is contained in:
Daan Selen 2025-07-24 20:23:42 +02:00
parent f1aa064b2d
commit 0cb46e1444
2 changed files with 15 additions and 13 deletions

View File

@ -22,5 +22,5 @@ jobs:
stale-issue-message: 'This issue has not been updated for 20 days'
stale-pr-message: 'This pull request has not been updated for 20 days'
stale-issue-label: 'stale'
exempt-issue-labels: 'enhancement,ongoing'
exempt-issue-labels: 'ongoing'
days-before-stale: 20

View File

@ -1,4 +1,4 @@
FROM golang:1.24 AS awg
FROM golang:1.24 AS awg-go
RUN git clone https://github.com/WGDashboard/amneziawg-go /awg
WORKDIR /awg
@ -6,23 +6,25 @@ RUN go mod download && \
go mod verify && \
go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin
FROM alpine:latest
LABEL maintainer="dselen@nerthus.nl"
FROM alpine:latest AS awg-tools
RUN apk update && apk add \
iproute2 iptables bash curl wget unzip procps sudo \
tzdata wireguard-tools python3 py3-psutil py3-bcrypt openresolv \
RUN apk update && apk add --no-cache \
make git build-base linux-headers \
&& cd /usr/bin/ \
&& git clone https://github.com/WGDashboard/amneziawg-tools \
&& cd amneziawg-tools/src \
&& make \
&& make install \
&& chmod +x /usr/bin/awg /usr/bin/awg-quick \
&& cd ../.. \
&& rm -R amneziawg-tools
&& chmod +x wg*
COPY --from=awg /usr/bin/amneziawg-go /usr/bin/amneziawg-go
FROM alpine:latest
LABEL maintainer="dselen@nerthus.nl"
RUN apk update && apk add --no-cache \
iproute2 iptables bash curl wget unzip procps sudo \
tzdata wireguard-tools python3 py3-psutil py3-bcrypt openresolv
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.
ARG wg_net="10.0.0.1" \