stagex/packages/linux-headers/Containerfile

27 lines
712 B
Text
Raw Normal View History

2024-02-09 07:30:28 +00:00
FROM scratch as base
ENV VERSION=6.6
ENV SRC_HASH=d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0
ENV SRC_FILE=linux-${VERSION}.tar.xz
ENV SRC_SITE=https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/${SRC_FILE}
2023-11-14 04:24:47 +00:00
2023-12-16 23:50:40 +00:00
FROM base as fetch
2024-02-09 07:30:28 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2023-12-16 23:50:40 +00:00
FROM fetch as build
COPY --from=stagex/stage3 . /
2024-02-09 07:30:28 +00:00
RUN tar -xf linux-${VERSION}.tar.xz
WORKDIR linux-${VERSION}
RUN --network=none make headers
2023-12-16 23:50:40 +00:00
FROM build as install
2024-02-09 07:30:28 +00:00
RUN <<-EOF
set -eux
mkdir -p /rootfs/usr
cp -a usr/include /rootfs/usr/
find /rootfs/usr/include/ ! -iname "*.h" -type f -exec rm -v {} \+
rm -rf /rootfs/usr/include/drm
EOF
2023-11-14 04:24:47 +00:00
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /