2025-02-24 06:42:57 +01:00
|
|
|
FROM golang:1.24 as euphoria
|
2025-02-23 20:10:54 +01:00
|
|
|
|
|
|
|
|
RUN apt-get update && apt install libluajit-5.1-dev -y
|
2025-02-24 06:42:57 +01:00
|
|
|
COPY . /euphoria
|
|
|
|
|
WORKDIR /euphoria
|
2025-02-23 20:10:54 +01:00
|
|
|
|
|
|
|
|
RUN go mod download && go mod verify
|
|
|
|
|
|
|
|
|
|
RUN CGO_LDFLAGS="-lm -lluajit-5.1" go build -tags luajit -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin
|
2023-12-19 18:46:04 +07:00
|
|
|
|
2024-02-02 22:56:00 +07:00
|
|
|
FROM alpine:3.19
|
2025-02-23 20:10:54 +01:00
|
|
|
ARG AWGTOOLS_RELEASE="0.1.0"
|
2024-02-13 21:27:34 +07:00
|
|
|
RUN apk --no-cache add iproute2 iptables bash && \
|
2024-02-13 21:44:41 +07:00
|
|
|
cd /usr/bin/ && \
|
2025-02-23 20:10:54 +01:00
|
|
|
wget https://github.com/amnezia-vpn/euphoria-tools/releases/download/v${AWGTOOLS_RELEASE}/alpine-3.19-amneziawg-tools.zip && \
|
2024-02-13 21:44:41 +07:00
|
|
|
unzip -j alpine-3.19-amneziawg-tools.zip && \
|
2024-02-20 20:29:36 +07:00
|
|
|
chmod +x /usr/bin/awg /usr/bin/awg-quick && \
|
|
|
|
|
ln -s /usr/bin/awg /usr/bin/wg && \
|
|
|
|
|
ln -s /usr/bin/awg-quick /usr/bin/wg-quick
|
2025-02-24 11:17:50 +01:00
|
|
|
COPY --from=euphoria /usr/bin/euphoria /usr/bin/amneziawg-go
|