mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 01:59:07 +00:00
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 <rolf.neugebauer@docker.com>
This commit is contained in:
parent
414b4c5275
commit
5176ce7dd3
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user