From 5176ce7dd392a7dfc1df3158b3d808d7b0147735 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Wed, 6 Jun 2018 18:24:42 +0100 Subject: [PATCH] kernel: Stash kernel source and WireGuard source in the package While we can re-create the kernel source code we don't have it handily available in one place. This commit stashes the kernel and the WireGuard source as /src/linux.tar.xz and /src/wireguard.tar.xz in the kernel package. This increases the size of the hub image by around 100MB. Signed-off-by: Rolf Neugebauer --- kernel/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/Dockerfile b/kernel/Dockerfile index c8ba2ee50..256f86e3b 100644 --- a/kernel/Dockerfile +++ b/kernel/Dockerfile @@ -84,6 +84,11 @@ RUN set -e && \ done; \ fi +RUN mkdir -p /out/src + +# Save kernel source +RUN tar cJf /out/src/linux.tar.xz /linux + # Kernel config RUN case $(uname -m) in \ x86_64) \ @@ -109,7 +114,6 @@ RUN case $(uname -m) in \ make oldconfig && \ if [ -z "${EXTRA}" ] && [ -z "${DEBUG}" ]; then diff .config ${KERNEL_DEF_CONF}; fi -RUN mkdir /out # Kernel RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \ @@ -130,6 +134,7 @@ RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \ # WireGuard RUN curl -sSL -o /wireguard.tar.xz "${WIREGUARD_URL}" && \ echo "${WIREGUARD_SHA256} /wireguard.tar.xz" | sha256sum -c - && \ + cp /wireguard.tar.xz /out/src/ && \ tar -C / --one-top-level=wireguard --strip-components=2 -xJf /wireguard.tar.xz "WireGuard-${WIREGUARD_VERSION}/src" && \ make -j "$(getconf _NPROCESSORS_ONLN)" M="/wireguard" modules