Merge pull request #833 from DaanSelen/hinakumo-patch
Some checks are pending
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Docker Build and Push / docker_build (push) Waiting to run
Docker Build and Push / docker_scan (push) Blocked by required conditions

Hinakumo patch
This commit is contained in:
Donald Zou 2025-07-26 02:18:40 +08:00 committed by GitHub
commit 85d1cc8be4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,24 +1,30 @@
FROM golang:1.24 AS awg
FROM golang:1.24 AS awg-go
RUN git clone https://github.com/amnezia-vpn/amneziawg-go /awg
RUN git clone https://github.com/WGDashboard/amneziawg-go /awg
WORKDIR /awg
RUN go mod download && \
go mod verify && \
go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin
FROM alpine:latest AS awg-tools
RUN apk update && apk add --no-cache \
make git build-base linux-headers \
&& git clone https://github.com/WGDashboard/amneziawg-tools \
&& cd amneziawg-tools/src \
&& make \
&& chmod +x wg*
FROM alpine:latest
LABEL maintainer="dselen@nerthus.nl"
RUN apk update && apk add \
RUN apk update && apk add --no-cache \
iproute2 iptables bash curl wget unzip procps sudo \
tzdata wireguard-tools python3 py3-psutil py3-bcrypt openresolv \
&& cd /usr/bin/ \
&& wget $(curl -s https://api.github.com/repos/amnezia-vpn/amneziawg-tools/releases/latest | grep 'alpine' | cut -d : -f 2,3 | tr -d '", ' | tail -n 1) \
&& unzip -j alpine-3.19-amneziawg-tools.zip \
&& chmod +x /usr/bin/awg /usr/bin/awg-quick \
&& rm alpine-3.19-amneziawg-tools.zip
tzdata wireguard-tools python3 py3-psutil py3-bcrypt openresolv
COPY --from=awg /usr/bin/amneziawg-go /usr/bin/amneziawg-go
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" \