mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-27 05:59:25 +00:00
kernel: Use local kernel source if available
The kernel build currently downloads the source tar ball every time, which is a little tedious when experimenting with kernel configs or when compiling the kernel multiple times. This commit adds a new 'fetch' make target which downloads the kernel sources into ./sources. Then in the Dockerfile we add the directory and only download the source if it is not present. The tarballs signature is till checked on each build. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
@@ -46,11 +46,12 @@ ENV WIREGUARD_URL=https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${WIREGUARD
|
||||
COPY keys.asc keys.asc
|
||||
|
||||
# Download and verify kernel
|
||||
COPY sources/ /
|
||||
RUN curl -fsSLO ${KERNEL_SHA256_SUMS} && \
|
||||
gpg2 -q --import keys.asc && \
|
||||
gpg2 --verify sha256sums.asc && \
|
||||
KERNEL_SHA256=$(grep linux-${KERNEL_VERSION}.tar.xz sha256sums.asc | cut -d ' ' -f 1) && \
|
||||
curl -fsSLO ${KERNEL_SOURCE} && \
|
||||
[ -f linux-${KERNEL_VERSION}.tar.xz ] || curl -fsSLO ${KERNEL_SOURCE} && \
|
||||
echo "${KERNEL_SHA256} linux-${KERNEL_VERSION}.tar.xz" | sha256sum -c - && \
|
||||
xz -d linux-${KERNEL_VERSION}.tar.xz && \
|
||||
curl -fsSLO ${KERNEL_PGP2_SIGN} && \
|
||||
|
Reference in New Issue
Block a user