mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
add wireguard
Signed-off-by: Jess Frazelle <acidburn@google.com>
This commit is contained in:
parent
420323634a
commit
303ac917e5
37
wireguard/Dockerfile
Normal file
37
wireguard/Dockerfile
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Usage:
|
||||
#
|
||||
# (this uses a custom kernel module hence the mounts)
|
||||
# docker run --rm -it \
|
||||
# --name wireguard \
|
||||
# --privileged \
|
||||
# -v /lib/modules:/lib/modules:ro \
|
||||
# -v /usr/src:/usr/src:ro \
|
||||
# r.j3ss.co/wireguard
|
||||
#
|
||||
FROM alpine:latest
|
||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||
|
||||
RUN apk add --no-cache \
|
||||
build-base \
|
||||
ca-certificates \
|
||||
libmnl-dev
|
||||
|
||||
# https://git.zx2c4.com/WireGuard/refs/
|
||||
ENV WIREGUARD_VERSION 0.0.20170324
|
||||
|
||||
RUN set -x \
|
||||
&& apk add --no-cache --virtual .build-deps \
|
||||
git \
|
||||
&& git clone --depth 1 --branch "${WIREGUARD_VERSION}" https://git.zx2c4.com/WireGuard.git /wireguard \
|
||||
&& ( \
|
||||
cd /wireguard/src \
|
||||
&& make tools \
|
||||
&& make -C tools install \
|
||||
&& make -C tools clean \
|
||||
) \
|
||||
&& apk del .build-deps
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
||||
CMD [ "wg" ]
|
11
wireguard/entrypoint.sh
Executable file
11
wireguard/entrypoint.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
(
|
||||
cd /wireguard/src
|
||||
make module
|
||||
make module-install
|
||||
make clean
|
||||
)
|
||||
|
||||
exec $@
|
Loading…
Reference in New Issue
Block a user