blob: 1d838c4efd79c24bb881dd9372879a2272337886 [file] [log] [blame]
giolekva6b879db2020-06-10 21:00:39 +04001FROM golang:1.14.1-alpine3.11 as builder
2
3ARG wg_go_tag=v0.0.20200320
4ARG wg_tools_tag=v1.0.20200513
5
6RUN apk add --update git build-base libmnl-dev iptables
7
8RUN git clone https://git.zx2c4.com/wireguard-go && \
9 cd wireguard-go && \
10 git checkout $wg_go_tag && \
11 make && \
12 make install
13
14ENV WITH_WGQUICK=yes
15RUN git clone https://git.zx2c4.com/wireguard-tools && \
16 cd wireguard-tools && \
17 git checkout $wg_tools_tag && \
18 cd src && \
19 make && \
20 make install
21
22FROM alpine:3.11
23
24RUN apk add --no-cache --update bash libmnl iptables openresolv iproute2
25
26COPY --from=builder /usr/bin/wireguard-go /usr/bin/wg* /usr/bin/
27COPY entrypoint.sh /entrypoint.sh
28
29CMD ["/entrypoint.sh"]