mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-04-03 19:00:42 +02:00
update wireguard
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
9eed2fb809
commit
d4ce312cc2
@ -32,8 +32,8 @@ build_and_push(){
|
|||||||
sleep 15
|
sleep 15
|
||||||
done
|
done
|
||||||
|
|
||||||
# also push the tag latest for "stable" (chrome) or "3.5" tags for zookeeper
|
# also push the tag latest for "stable" (chrome), "tools" (wireguard) or "3.5" tags for zookeeper
|
||||||
if [[ "$suite" == "stable" ]] || [[ "$suite" == "3.5" ]]; then
|
if [[ "$suite" == "stable" ]] || [[ "$suite" == "3.5" ]] || [[ "$suite" == "tools" ]]; then
|
||||||
docker tag ${REPO_URL}/${base}:${suite} ${REPO_URL}/${base}:latest
|
docker tag ${REPO_URL}/${base}:${suite} ${REPO_URL}/${base}:latest
|
||||||
docker push --disable-content-trust=false ${REPO_URL}/${base}:latest
|
docker push --disable-content-trust=false ${REPO_URL}/${base}:latest
|
||||||
fi
|
fi
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
(
|
|
||||||
cd /wireguard/src
|
|
||||||
make module
|
|
||||||
make module-install
|
|
||||||
make clean
|
|
||||||
)
|
|
||||||
|
|
||||||
exec $@
|
|
@ -1,12 +1,12 @@
|
|||||||
# Usage:
|
# 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 \
|
# docker run --rm -it \
|
||||||
# --name wireguard \
|
# --name wireguard \
|
||||||
# --privileged \
|
# -v /lib/modules:/lib/modules \
|
||||||
# -v /lib/modules:/lib/modules:ro \
|
|
||||||
# -v /usr/src:/usr/src:ro \
|
# -v /usr/src:/usr/src:ro \
|
||||||
# r.j3ss.co/wireguard
|
# r.j3ss.co/wireguard:install
|
||||||
#
|
#
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||||
@ -14,6 +14,7 @@ LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
build-base \
|
build-base \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
libelf-dev \
|
||||||
libmnl-dev
|
libmnl-dev
|
||||||
|
|
||||||
# https://git.zx2c4.com/WireGuard/refs/
|
# https://git.zx2c4.com/WireGuard/refs/
|
||||||
@ -34,4 +35,4 @@ RUN set -x \
|
|||||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
||||||
CMD [ "wg" ]
|
CMD [ "wg", "--help" ]
|
16
wireguard/install/entrypoint.sh
Executable file
16
wireguard/install/entrypoint.sh
Executable 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 $@
|
13
wireguard/tools/Dockerfile
Normal file
13
wireguard/tools/Dockerfile
Normal 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"]
|
Loading…
x
Reference in New Issue
Block a user