From 0cb46e14447c865401fed6f2eabef86cc88491c7 Mon Sep 17 00:00:00 2001 From: Daan Selen Date: Thu, 24 Jul 2025 20:23:42 +0200 Subject: [PATCH] Docker file update --- .github/workflows/stale.yml | 2 +- docker/Dockerfile | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4ad4903..01e4441 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -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 diff --git a/docker/Dockerfile b/docker/Dockerfile index 1e2d84d..8e659de 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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" \