update wireguard

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-05-28 21:22:26 -04:00
parent 9eed2fb809
commit d4ce312cc2
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3
5 changed files with 37 additions and 18 deletions

View File

@ -32,8 +32,8 @@ build_and_push(){
sleep 15
done
# also push the tag latest for "stable" (chrome) or "3.5" tags for zookeeper
if [[ "$suite" == "stable" ]] || [[ "$suite" == "3.5" ]]; then
# also push the tag latest for "stable" (chrome), "tools" (wireguard) or "3.5" tags for zookeeper
if [[ "$suite" == "stable" ]] || [[ "$suite" == "3.5" ]] || [[ "$suite" == "tools" ]]; then
docker tag ${REPO_URL}/${base}:${suite} ${REPO_URL}/${base}:latest
docker push --disable-content-trust=false ${REPO_URL}/${base}:latest
fi

View File

@ -1,11 +0,0 @@
#!/bin/sh
set -e
(
cd /wireguard/src
make module
make module-install
make clean
)
exec $@

View File

@ -1,12 +1,12 @@
# Usage:
#
# (this uses a custom kernel module hence the mounts)
# This uses a custom installs a kernel module hence the mounts
# docker run --rm -it \
# --name wireguard \
# --privileged \
# -v /lib/modules:/lib/modules:ro \
# -v /lib/modules:/lib/modules \
# -v /usr/src:/usr/src:ro \
# r.j3ss.co/wireguard
# r.j3ss.co/wireguard:install
#
FROM alpine:latest
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
@ -14,6 +14,7 @@ LABEL maintainer "Jessie Frazelle <jess@linux.com>"
RUN apk add --no-cache \
build-base \
ca-certificates \
libelf-dev \
libmnl-dev
# https://git.zx2c4.com/WireGuard/refs/
@ -34,4 +35,4 @@ RUN set -x \
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
CMD [ "wg" ]
CMD [ "wg", "--help" ]

16
wireguard/install/entrypoint.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
set -e
(
cd /wireguard/src
echo "Building the wireguard kernel module..."
make module
echo "Installing the wireguard kernel module..."
make module-install
echo "Cleaning up..."
make clean
)
echo "Successfully built and installed the wireguard kernel module!"
exec $@

View File

@ -0,0 +1,13 @@
FROM alpine:latest
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
RUN apk add --no-cache \
ca-certificates \
libmnl
COPY --from=r.j3ss.co/wireguard:install /usr/bin/wg /usr/bin/wg
COPY --from=r.j3ss.co/wireguard:install /usr/share/man/man8/wg.8 /usr/share/man/man8/wg.8
ENTRYPOINT ["wg"]
CMD ["--help"]