From 2e083848584a534d6b2c6687e9af7e6b229d8e2d Mon Sep 17 00:00:00 2001 From: ps Date: Fri, 15 May 2020 07:47:39 +0200 Subject: [PATCH] fix wireguard build, change to sid-slim (#516) --- wireguard/install/Dockerfile | 37 ++++++++++++++++++++---------------- wireguard/tools/Dockerfile | 8 +++++--- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/wireguard/install/Dockerfile b/wireguard/install/Dockerfile index d0cd4bd..c2099f9 100644 --- a/wireguard/install/Dockerfile +++ b/wireguard/install/Dockerfile @@ -8,29 +8,34 @@ # -v /usr/src:/usr/src:ro \ # r.j3ss.co/wireguard:install # -FROM alpine:latest +FROM debian:sid-slim LABEL maintainer "Jessie Frazelle " -RUN apk add --no-cache \ - build-base \ +RUN apt update && apt -y install \ + build-essential \ ca-certificates \ - elfutils-libelf \ - libmnl-dev + git \ + kmod \ + libelf-dev \ + libmnl-dev \ + pkg-config \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* -# https://git.zx2c4.com/WireGuard/refs/ -ENV WIREGUARD_VERSION 0.0.20191205 +# https://git.zx2c4.com/wireguard-linux-compat/ +ENV WIREGUARD_VERSION v0.0.20200128 +# https://git.zx2c4.com/wireguard-tools +ENV WIREGUARD_TOOLS_VERSION v1.0.20200121 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 \ + && 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 \ && ( \ - cd /wireguard/src \ - && make tools \ - && make -C tools install \ - && make -C tools clean \ - ) \ - && apk del .build-deps + cd /wireguard-tools/src \ + && make -j$(nproc) \ + && make install \ + && make clean \ + ) COPY entrypoint.sh /usr/local/bin/entrypoint.sh diff --git a/wireguard/tools/Dockerfile b/wireguard/tools/Dockerfile index 7214fe2..91ba934 100644 --- a/wireguard/tools/Dockerfile +++ b/wireguard/tools/Dockerfile @@ -1,10 +1,12 @@ -FROM alpine:latest +FROM debian:sid-slim LABEL maintainer "Jessie Frazelle " -RUN apk add --no-cache \ +RUN apt update && apt -y install \ ca-certificates \ - libmnl + libmnl-dev \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* 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