mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
kernels: Add support for creating Debian kernel packages
This only pulls in 4.x kernels and does not include the headers to build modules against. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
5b28cfafb2
commit
4f5c5aca7a
25
scripts/kernels/debian.sh
Executable file
25
scripts/kernels/debian.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
REPO="linuxkit/kernel-debian"
|
||||||
|
BASE_URL=http://mirrors.kernel.org/debian/pool/main/l/linux/
|
||||||
|
|
||||||
|
ARCH=amd64
|
||||||
|
LINKS=$(curl -s ${BASE_URL}/ | sed -n 's/.*href="\([^"]*\).*/\1/p')
|
||||||
|
# Just get names for 4.x kernels
|
||||||
|
KERNELS=$(echo $LINKS | \
|
||||||
|
grep -o "linux-image-4\.[0-9]\+\.[0-9]\+-[0-9]\+-${ARCH}[^ ]\+_${ARCH}\.deb")
|
||||||
|
|
||||||
|
for KERN_DEB in $KERNELS; do
|
||||||
|
VERSION=$(echo $KERN_DEB | \
|
||||||
|
grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+-[0-9]\+" | head -1)
|
||||||
|
|
||||||
|
echo "$VERSION -> $KERN_DEB"
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker pull ${REPO}:${VERSION} && continue
|
||||||
|
|
||||||
|
URLS="${BASE_URL}/${KERN_DEB}"
|
||||||
|
|
||||||
|
# Doesn't exist build and push
|
||||||
|
docker build -t ${REPO}:${VERSION} -f Dockerfile.deb --no-cache \
|
||||||
|
--build-arg DEB_URLS="${URLS}" . &&
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker push ${REPO}:${VERSION})
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user