2017-03-24 21:27:12 +01:00
|
|
|
# Usage:
|
|
|
|
#
|
2018-05-29 03:22:26 +02:00
|
|
|
# This uses a custom installs a kernel module hence the mounts
|
|
|
|
|
2017-03-24 21:27:12 +01:00
|
|
|
# docker run --rm -it \
|
|
|
|
# --name wireguard \
|
2018-05-29 03:22:26 +02:00
|
|
|
# -v /lib/modules:/lib/modules \
|
2017-03-24 21:27:12 +01:00
|
|
|
# -v /usr/src:/usr/src:ro \
|
2018-05-29 03:22:26 +02:00
|
|
|
# r.j3ss.co/wireguard:install
|
2017-03-24 21:27:12 +01:00
|
|
|
#
|
2020-05-15 07:47:39 +02:00
|
|
|
FROM debian:sid-slim
|
2017-03-24 21:27:12 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|
|
|
|
2020-05-15 07:47:39 +02:00
|
|
|
RUN apt update && apt -y install \
|
|
|
|
build-essential \
|
2017-03-24 21:27:12 +01:00
|
|
|
ca-certificates \
|
2020-05-15 07:47:39 +02:00
|
|
|
git \
|
|
|
|
kmod \
|
|
|
|
libelf-dev \
|
|
|
|
libmnl-dev \
|
|
|
|
pkg-config \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2017-03-24 21:27:12 +01:00
|
|
|
|
2020-05-15 07:47:39 +02:00
|
|
|
# https://git.zx2c4.com/wireguard-linux-compat/
|
2020-05-29 22:44:12 +02:00
|
|
|
ENV WIREGUARD_VERSION v1.0.20200520
|
2020-05-15 07:47:39 +02:00
|
|
|
# https://git.zx2c4.com/wireguard-tools
|
2020-05-15 08:48:26 +02:00
|
|
|
ENV WIREGUARD_TOOLS_VERSION v1.0.20200513
|
2017-03-24 21:27:12 +01:00
|
|
|
|
|
|
|
RUN set -x \
|
2020-05-15 07:47:39 +02:00
|
|
|
&& git clone --depth 1 --branch "${WIREGUARD_VERSION}" https://git.zx2c4.com/wireguard-linux-compat.git /wireguard \
|
|
|
|
&& git clone --depth 1 --branch "${WIREGUARD_TOOLS_VERSION}" https://git.zx2c4.com/wireguard-tools.git /wireguard-tools \
|
2017-03-24 21:27:12 +01:00
|
|
|
&& ( \
|
2020-05-15 07:47:39 +02:00
|
|
|
cd /wireguard-tools/src \
|
|
|
|
&& make -j$(nproc) \
|
|
|
|
&& make install \
|
|
|
|
&& make clean \
|
|
|
|
)
|
2017-03-24 21:27:12 +01:00
|
|
|
|
|
|
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
2018-05-29 03:22:26 +02:00
|
|
|
CMD [ "wg", "--help" ]
|