| 123456789101112131415161718192021222324252627282930313233343536373839 | FROM gravitl/go-builder:latest as builder# add glib support daemon managerWORKDIR /appCOPY . .ENV GO111MODULE=autoRUN GOOS=linux CGO_ENABLED=0 /usr/local/go/bin/go build -ldflags="-w -s" -o netclient-app netclient/main.goWORKDIR /root/RUN apk add --update git build-base libmnl-dev iptablesRUN git clone https://git.zx2c4.com/wireguard-go && \    cd wireguard-go && \    make && \    make installENV WITH_WGQUICK=yesRUN git clone https://git.zx2c4.com/wireguard-tools && \    cd wireguard-tools && \    cd src && \    make && \    make installFROM alpine:3.16.2WORKDIR /root/RUN apk add --no-cache --update bash libmnl gcompat iptables openresolv iproute2COPY --from=builder /usr/bin/wireguard-go /usr/bin/wg* /usr/bin/COPY --from=builder /app/netclient-app ./netclientCOPY --from=builder /app/scripts/netclient.sh .RUN chmod 0755 netclient && chmod 0755 netclient.shENV WG_QUICK_USERSPACE_IMPLEMENTATION=wireguard-goENTRYPOINT ["/bin/bash", "./netclient.sh"]
 |