aboutsummaryrefslogtreecommitdiff
path: root/al2-wireguard/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'al2-wireguard/Dockerfile')
-rw-r--r--al2-wireguard/Dockerfile56
1 files changed, 0 insertions, 56 deletions
diff --git a/al2-wireguard/Dockerfile b/al2-wireguard/Dockerfile
deleted file mode 100644
index ca76f37..0000000
--- a/al2-wireguard/Dockerfile
+++ /dev/null
@@ -1,56 +0,0 @@
1FROM amazonlinux:2 AS builder
2LABEL maintainer="Mike Crute <mike@crute.us>"
3
4ARG VERSION
5ARG REGION
6
7RUN set -euxo pipefail; \
8 echo "${REGION}" > /etc/yum/vars/awsregion; \
9 amazon-linux-extras install -y kernel-ng; \
10 yum install -y \
11 libmnl-devel \
12 libmnl-static \
13 glibc-static \
14 elfutils-libelf-devel \
15 kernel-devel \
16 pkgconfig \
17 "@Development Tools" \
18 ; \
19 curl -Ls https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${VERSION}.tar.xz | tar -xJC /usr/src; \
20 cd /usr/src/WireGuard-${VERSION}/src; \
21 \
22 make module; \
23 make LDFLAGS="-static" tools
24
25
26FROM amazonlinux:2
27LABEL maintainer="Mike Crute <mike@crute.us>"
28
29ARG VERSION
30
31COPY --from=builder /usr/src/WireGuard-${VERSION}/ /tmp/WireGuard-${VERSION}/
32
33RUN set -euxo pipefail; \
34 yum install -y kmod; \
35 \
36 mkdir -p /opt/wireguard; \
37 cp /tmp/WireGuard-${VERSION}/src/wireguard.ko /opt/wireguard; \
38 \
39 cd /tmp/WireGuard-${VERSION}/src; \
40 \
41 install -v -d "/usr/bin"; \
42 install -v -d "/usr/share/man/man8"; \
43 install -v -m 0755 tools/wg "/usr/bin/wg"; \
44 install -v -m 0644 tools/man/wg.8 "/usr/share/man/man8/wg.8"; \
45 \
46 install -v -m 0700 -d "/etc/wireguard"; \
47 install -v -m 0755 tools/wg-quick/linux.bash "/usr/bin/wg-quick"; \
48 install -v -m 0644 tools/man/wg-quick.8 "/usr/share/man/man8/wg-quick.8"; \
49 \
50 yum clean all; \
51 rm -rf /tmp/WireGuard-${VERSION} /var/cache/yum
52
53ADD entrypoint.sh /
54
55ENTRYPOINT [ "/entrypoint.sh" ]
56CMD [ "sleep", "infinity" ]