-
-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
130 changed files
with
5,115 additions
and
2,237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,35 @@ | ||
FROM golang:1.23 AS compiler | ||
WORKDIR /go | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
git make bash build-essential \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN git clone --depth=1 https://github.com/amnezia-vpn/amneziawg-tools.git && \ | ||
git clone --depth=1 https://github.com/amnezia-vpn/amneziawg-go.git | ||
RUN cd /go/amneziawg-tools/src && make | ||
|
||
RUN cd /go/amneziawg-go && \ | ||
go get -u ./... && \ | ||
go mod tidy && \ | ||
make && \ | ||
chmod +x /go/amneziawg-go/amneziawg-go /go/amneziawg-tools/src/wg /go/amneziawg-tools/src/wg-quick/linux.bash | ||
RUN echo "DONE AmneziaWG" | ||
|
||
### INTERMEDIATE STAGE | ||
FROM scratch AS bins | ||
COPY --from=compiler /go/amneziawg-go/amneziawg-go /amneziawg-go | ||
COPY --from=compiler /go/amneziawg-tools/src/wg /awg | ||
COPY --from=compiler /go/amneziawg-tools/src/wg-quick/linux.bash /awg-quick | ||
|
||
# FINAL STAGE | ||
FROM alpine:latest | ||
LABEL maintainer="[email protected]" | ||
|
||
COPY --from=bins /amneziawg-go /usr/bin/amneziawg-go | ||
COPY --from=bins /awg /usr/bin/awg | ||
COPY --from=bins /awg-quick /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" | ||
ARG wg_port="51820" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.