From b378c014331e2f012a2c58c29ebea77b54463220 Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 11:10:05 +0100 Subject: [PATCH 01/13] fix(images/x86_64/ubuntu/4.15): fix broken images The generated rootfs and kernel artifacts don't seem to work with the actual firecracker configuration. Generate them leveraging different mirrors and using an aws different version. Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/x86_64/ubuntu/4.15/Dockerfile | 6 +++--- images/x86_64/ubuntu/4.15/Dockerfile.kernel | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/images/x86_64/ubuntu/4.15/Dockerfile b/images/x86_64/ubuntu/4.15/Dockerfile index 58fcc3b..bb9bff2 100644 --- a/images/x86_64/ubuntu/4.15/Dockerfile +++ b/images/x86_64/ubuntu/4.15/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:18.04 -ARG VERSION=4.15.0-213 -ARG URL='http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux/' +ARG VERSION=4.15.0-1118-aws +ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws/' WORKDIR /home/ubuntu @@ -30,7 +30,7 @@ RUN apt-get update && apt-get install -y \ curl ${URL} | \ grep -E "linux-headers-${VERSION}|linux-tools-${VERSION}|linux-tools-common_${VERSION}" | \ grep -vE 'i386|lowlatency' | \ - cut -d\" -f2 | \ + cut -d\" -f8 | \ xargs -I@ curl -LO ${URL}@ && \ find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \ rm -f *.deb && \ diff --git a/images/x86_64/ubuntu/4.15/Dockerfile.kernel b/images/x86_64/ubuntu/4.15/Dockerfile.kernel index 0ef4550..9aedfd1 100644 --- a/images/x86_64/ubuntu/4.15/Dockerfile.kernel +++ b/images/x86_64/ubuntu/4.15/Dockerfile.kernel @@ -1,20 +1,20 @@ FROM initrd-builder:0.0.1 AS builder -ARG VERSION=4.15.0-213-generic -ARG URL='http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux/' +ARG VERSION=4.15.0-1118-aws +ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws/' WORKDIR /home/ubuntu RUN touch .placeholder && \ curl ${URL} | \ - grep -E "kernel-image-${VERSION}|linux-modules-${VERSION}" | \ + grep -E "linux-image-${VERSION}|linux-modules-${VERSION}" | \ grep -E "amd64" | \ - cut -d\" -f2 | \ + cut -d\" -f8 | \ xargs -I@ curl -LO ${URL}@ && \ mkdir extracted && \ ls *deb | \ xargs -I@ dpkg -x @ extracted && \ - extract-vmlinux extracted/boot/vmlinuz > out/vmlinux && \ + extract-vmlinux extracted/boot/vmlinuz-${VERSION} > out/vmlinux && \ cd extracted && \ /opt/initrd-builder/create.sh From c3d1685855c3009780f4ad2d717daba357aa09a0 Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 10:38:39 +0100 Subject: [PATCH 02/13] fix(images/x86_64/ubuntu/6.2): replace unavailable mirror and version Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/x86_64/ubuntu/6.2/Dockerfile | 15 +++++++++------ images/x86_64/ubuntu/6.2/Dockerfile.kernel | 6 +++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/images/x86_64/ubuntu/6.2/Dockerfile b/images/x86_64/ubuntu/6.2/Dockerfile index b0cdc2c..cb30c67 100644 --- a/images/x86_64/ubuntu/6.2/Dockerfile +++ b/images/x86_64/ubuntu/6.2/Dockerfile @@ -1,11 +1,11 @@ FROM ubuntu:22.04 -ARG VERSION=6.2.0-36-generic +ARG VERSION=6.2.0-1018-aws +ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws-6.2/' WORKDIR /home/ubuntu -RUN echo 'deb http://mirrors.edge.kernel.org/ubuntu/ jammy main' > /etc/apt/sources.list.d/kernel.org.list && \ - apt-get update && apt-get install -y \ +RUN apt-get update && apt-get install -y \ build-essential \ clang \ cmake \ @@ -17,8 +17,6 @@ RUN echo 'deb http://mirrors.edge.kernel.org/ubuntu/ jammy main' > /etc/apt/sour kmod \ libcap-dev \ libelf-dev \ - linux-headers-${VERSION} \ - linux-tools-${VERSION} \ llvm \ net-tools \ openssh-server \ @@ -29,7 +27,12 @@ RUN echo 'deb http://mirrors.edge.kernel.org/ubuntu/ jammy main' > /etc/apt/sour udev \ wget && \ apt-get clean && \ - rm -rf /var/lib/apt/lists/* && \ + curl ${URL} | \ + grep -E "linux-headers-${VERSION}|linux-tools-${VERSION}|linux-tools-common_${VERSION}" | \ + cut -d\" -f8 | \ + xargs -I@ curl -LO ${URL}@ && \ + find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \ + rm -f *.deb && \ echo "" > /etc/machine-id && echo "" > /var/lib/dbus/machine-id && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ diff --git a/images/x86_64/ubuntu/6.2/Dockerfile.kernel b/images/x86_64/ubuntu/6.2/Dockerfile.kernel index 699cece..b9ef1da 100644 --- a/images/x86_64/ubuntu/6.2/Dockerfile.kernel +++ b/images/x86_64/ubuntu/6.2/Dockerfile.kernel @@ -1,14 +1,14 @@ FROM initrd-builder:0.0.1 AS builder -ARG VERSION=6.2.0-36-generic -ARG URL='http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux/' +ARG VERSION=6.2.0-1018-aws +ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws-6.2/' WORKDIR /home/ubuntu RUN touch .placeholder && \ curl ${URL} | \ grep -E "linux-image-unsigned-${VERSION}|linux-modules-${VERSION}" | \ - cut -d\" -f2 | \ + cut -d\" -f8 | \ xargs -I@ curl -LO ${URL}@ && \ mkdir extracted && \ ls *deb | \ From a587ffabc6b4a0ece956dd08c3823a3abb43004a Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 10:26:44 +0100 Subject: [PATCH 03/13] fix(images/x86_64/ubuntu/6.5): replace unavailable mirror and version Contextually, replace `rootfs` base image with `ubuntu:22.04`. Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/x86_64/ubuntu/6.5/Dockerfile | 8 ++++---- images/x86_64/ubuntu/6.5/Dockerfile.kernel | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/images/x86_64/ubuntu/6.5/Dockerfile b/images/x86_64/ubuntu/6.5/Dockerfile index aca6987..cb718e2 100644 --- a/images/x86_64/ubuntu/6.5/Dockerfile +++ b/images/x86_64/ubuntu/6.5/Dockerfile @@ -1,7 +1,7 @@ -FROM ubuntu:23.10 +FROM ubuntu:22.04 -ARG VERSION=6.5.0-17 -ARG URL='http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux/' +ARG VERSION=6.5.0-1024-aws +ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws-6.5/' WORKDIR /home/ubuntu @@ -30,7 +30,7 @@ RUN apt-get update && apt-get install -y \ rm -rf /var/lib/apt/lists/* && \ curl ${URL} | \ grep -E "linux-headers-${VERSION}|linux-tools-${VERSION}|linux-tools-common_${VERSION}" | \ - cut -d\" -f2 | \ + cut -d\" -f8 | \ xargs -I@ curl -LO ${URL}@ && \ find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \ rm -f *.deb && \ diff --git a/images/x86_64/ubuntu/6.5/Dockerfile.kernel b/images/x86_64/ubuntu/6.5/Dockerfile.kernel index 780f8d2..da2fac3 100644 --- a/images/x86_64/ubuntu/6.5/Dockerfile.kernel +++ b/images/x86_64/ubuntu/6.5/Dockerfile.kernel @@ -1,14 +1,14 @@ FROM initrd-builder:0.0.1 AS builder -ARG VERSION=6.5.0-17-generic -ARG URL='http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux/' +ARG VERSION=6.5.0-1024-aws +ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws-6.5/' WORKDIR /home/ubuntu RUN touch .placeholder && \ curl ${URL} | \ grep -E "linux-image-unsigned-${VERSION}|linux-modules-${VERSION}" | \ - cut -d\" -f2 | \ + cut -d\" -f8 | \ xargs -I@ curl -LO ${URL}@ && \ mkdir extracted && \ ls *deb | \ From d91a057e812bd3e1a5d63db15a2cace279eb2a42 Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 10:30:19 +0100 Subject: [PATCH 04/13] fix(images/x86_64/centos/3.10): replace unavailable mirrors Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/x86_64/centos/3.10/Dockerfile | 7 ++++++- images/x86_64/centos/3.10/Dockerfile.kernel | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/images/x86_64/centos/3.10/Dockerfile b/images/x86_64/centos/3.10/Dockerfile index bf26cce..bd2a6f5 100644 --- a/images/x86_64/centos/3.10/Dockerfile +++ b/images/x86_64/centos/3.10/Dockerfile @@ -1,7 +1,12 @@ FROM centos:centos7.9.2009 ARG VERSION=3.10.0-1160 -ARG BASEOS_URL='http://mirror.centos.org/centos/7.9.2009/os/x86_64/Packages' +ARG BASEOS_URL='https://vault.centos.org/centos/7.9.2009/os/x86_64/Packages' + +# Fix broken mirrors. +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ + sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo; \ + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo RUN yum group install -y "Development Tools" && \ yum install -y \ diff --git a/images/x86_64/centos/3.10/Dockerfile.kernel b/images/x86_64/centos/3.10/Dockerfile.kernel index e2ad809..0aedb97 100644 --- a/images/x86_64/centos/3.10/Dockerfile.kernel +++ b/images/x86_64/centos/3.10/Dockerfile.kernel @@ -1,5 +1,5 @@ ARG VERSION=3.10.0-1160 -ARG BASEOS_URL='http://mirror.centos.org/centos/7.9.2009/os/x86_64/Packages' +ARG BASEOS_URL='https://vault.centos.org/centos/7.9.2009/os/x86_64/Packages' ARG ARCHITECTURE=x86_64 FROM initrd-builder:0.0.1 AS stage1 @@ -23,7 +23,7 @@ RUN touch .placeholder && \ cd .. && \ extract-vmlinux $(find ./extracted/ -name 'vmlinuz*') > extracted/vmlinux -FROM centos:centos7.9.2009 as kmod-builder +FROM centos:centos7.9.2009 AS kmod-builder ARG VERSION ARG BASEOS_URL @@ -33,6 +33,11 @@ WORKDIR /home/ubuntu COPY --from=stage1 /home/ubuntu/extracted /home/ubuntu/extracted/ COPY --from=stage1 /opt/initrd-builder/* /opt/initrd-builder/ +# Fix broken mirrors. +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ + sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo; \ + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo + RUN yum groupinstall -y 'Development Tools' && \ cp -v /opt/initrd-builder/Makefile.virtio_mmio Makefile && \ mkdir src && \ From 2f83286872f89c5fa35cd99099a77f6c6da45d89 Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 10:32:10 +0100 Subject: [PATCH 05/13] fix(images/x86_64/centos/4.18): replace unavailable mirrors/version Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/x86_64/centos/4.18/Dockerfile | 9 +++++++-- images/x86_64/centos/4.18/Dockerfile.kernel | 11 ++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/images/x86_64/centos/4.18/Dockerfile b/images/x86_64/centos/4.18/Dockerfile index 4ee9eb0..b41c088 100644 --- a/images/x86_64/centos/4.18/Dockerfile +++ b/images/x86_64/centos/4.18/Dockerfile @@ -1,7 +1,12 @@ FROM quay.io/centos/centos:stream8 -ARG VERSION=4.18.0-536 -ARG BASEOS_URL='http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages' +ARG VERSION=4.18.0-552 +ARG BASEOS_URL='https://vault.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages' + +# Fix broken mirrors. +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ + sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo; \ + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y --allowerasing \ diff --git a/images/x86_64/centos/4.18/Dockerfile.kernel b/images/x86_64/centos/4.18/Dockerfile.kernel index 27e182f..009c70d 100644 --- a/images/x86_64/centos/4.18/Dockerfile.kernel +++ b/images/x86_64/centos/4.18/Dockerfile.kernel @@ -1,5 +1,5 @@ -ARG VERSION=4.18.0-536 -ARG BASEOS_URL='http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages' +ARG VERSION=4.18.0-552 +ARG BASEOS_URL='https://vault.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages' ARG ARCHITECTURE=x86_64 FROM initrd-builder:0.0.1 AS stage1 @@ -29,7 +29,7 @@ RUN touch .placeholder && \ cd .. && \ extract-vmlinux $(find ./extracted/ -name 'vmlinuz*') > extracted/vmlinux -FROM quay.io/centos/centos:stream8 as kmod-builder +FROM quay.io/centos/centos:stream8 AS kmod-builder ARG VERSION ARG BASEOS_URL @@ -39,6 +39,11 @@ WORKDIR /home/ubuntu COPY --from=stage1 /home/ubuntu/extracted /home/ubuntu/extracted/ COPY --from=stage1 /opt/initrd-builder/* /opt/initrd-builder/ +# Fix broken mirrors. +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ + sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo; \ + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo + RUN dnf groupinstall -y 'Development Tools' && \ cp -v /opt/initrd-builder/Makefile.virtio_mmio Makefile && \ curl -LO 'https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-8/-/raw/c8s/drivers/virtio/virtio_mmio.c' && \ From fba4a4991913df0de00c35e00f41dd8fed370563 Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 10:34:48 +0100 Subject: [PATCH 06/13] fix(images/x86_64/centos/5.14): replace unavailable version Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/x86_64/centos/5.14/Dockerfile | 2 +- images/x86_64/centos/5.14/Dockerfile.kernel | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/x86_64/centos/5.14/Dockerfile b/images/x86_64/centos/5.14/Dockerfile index 8b0aed1..20fd220 100644 --- a/images/x86_64/centos/5.14/Dockerfile +++ b/images/x86_64/centos/5.14/Dockerfile @@ -1,6 +1,6 @@ FROM quay.io/centos/centos:stream9 -ARG VERSION=5.14.0-412 +ARG VERSION=5.14.0-648 ARG APPSTR_URL='http://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages' RUN dnf groupinstall -y 'Development Tools' && \ diff --git a/images/x86_64/centos/5.14/Dockerfile.kernel b/images/x86_64/centos/5.14/Dockerfile.kernel index 17d45dc..75dbe58 100644 --- a/images/x86_64/centos/5.14/Dockerfile.kernel +++ b/images/x86_64/centos/5.14/Dockerfile.kernel @@ -1,4 +1,4 @@ -ARG VERSION=5.14.0-412 +ARG VERSION=5.14.0-648 ARG BASEOS_URL='https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/Packages' ARG APPSTR_URL='http://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages' ARG ARCHITECTURE=x86_64 @@ -31,7 +31,7 @@ RUN touch .placeholder && \ cd .. && \ extract-vmlinux $(find ./extracted/ -name 'vmlinuz*') > extracted/vmlinux -FROM quay.io/centos/centos:stream9 as kmod-builder +FROM quay.io/centos/centos:stream9 AS kmod-builder ARG VERSION ARG BASEOS_URL From e4dfd95c797bdd89dca21ba2fe5d14cbe1ae152b Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 10:35:45 +0100 Subject: [PATCH 07/13] fix(images/x86_64/fedora/6.2): replace unavailable mirror Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/x86_64/fedora/6.2/Dockerfile | 2 +- images/x86_64/fedora/6.2/Dockerfile.kernel | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/x86_64/fedora/6.2/Dockerfile b/images/x86_64/fedora/6.2/Dockerfile index ebff9f2..22d38d1 100644 --- a/images/x86_64/fedora/6.2/Dockerfile +++ b/images/x86_64/fedora/6.2/Dockerfile @@ -2,7 +2,7 @@ FROM fedora:38 ARG VERSION=6.2.9-300 ARG HVERSION=6.2.6-300 -ARG URL='https://mirrors.kernel.org/fedora/releases/38/Everything/x86_64/os/Packages' +ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/38/Everything/x86_64/os/Packages' RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ diff --git a/images/x86_64/fedora/6.2/Dockerfile.kernel b/images/x86_64/fedora/6.2/Dockerfile.kernel index 62053db..1381766 100644 --- a/images/x86_64/fedora/6.2/Dockerfile.kernel +++ b/images/x86_64/fedora/6.2/Dockerfile.kernel @@ -1,6 +1,6 @@ ARG VERSION=6.2.9-300 ARG HVERSION=6.2.6-300 -ARG URL='https://mirrors.kernel.org/fedora/releases/38/Everything/x86_64/os/Packages' +ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/38/Everything/x86_64/os/Packages' ARG ARCHITECTURE=x86_64 FROM initrd-builder:0.0.1 AS stage1 @@ -33,7 +33,7 @@ RUN touch .placeholder && \ find . -name '*.xz' -exec xz -d {} \; && \ extract-vmlinux $(find lib/modules -name vmlinuz) > /home/ubuntu/extracted/vmlinux -FROM fedora:38 as kmod-builder +FROM fedora:38 AS kmod-builder ARG VERSION ARG HVERSION From 7cef4c08ddc854f8df5d7f6d6b2411feb42ed06d Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 10:41:38 +0100 Subject: [PATCH 08/13] fix(images/x86_64/amazonlinux2023/6.1): fix hdrs/srcs installation Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/x86_64/amazonlinux2023/6.1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/x86_64/amazonlinux2023/6.1/Dockerfile b/images/x86_64/amazonlinux2023/6.1/Dockerfile index b429ed6..5fbe2f5 100644 --- a/images/x86_64/amazonlinux2023/6.1/Dockerfile +++ b/images/x86_64/amazonlinux2023/6.1/Dockerfile @@ -25,7 +25,7 @@ RUN dnf groupinstall -y 'Development Tools' && \ xargs -I@ curl -Lo headers.rpm ${URL}@ && \ grep -E 'kernel-devel-'${VERSION}'.*.rpm' primary.xml | grep href | cut -d\" -f2 | \ xargs -I@ curl -Lo sources.rpm ${URL}@ && \ - dnf install -y ./headers.rpm ./sources.rpm && \ + rpm -ivh --force --nodeps ./headers.rpm ./sources.rpm && \ rm -vf ./headers.rpm ./sources.rpm && \ dnf clean all && \ rm -rf /var/cache/yum && \ From 72c1018ebca9d2ff090d7c4341b0b84d4002c4f5 Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 11:49:43 +0100 Subject: [PATCH 09/13] fix(images/aarch64/fedora/6.2): replace unavailable mirror Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/aarch64/fedora/6.2/Dockerfile | 3 ++- images/aarch64/fedora/6.2/Dockerfile.kernel | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/images/aarch64/fedora/6.2/Dockerfile b/images/aarch64/fedora/6.2/Dockerfile index 8b68e2c..878e32d 100644 --- a/images/aarch64/fedora/6.2/Dockerfile +++ b/images/aarch64/fedora/6.2/Dockerfile @@ -3,7 +3,7 @@ FROM fedora:38 ARG VERSION=6.2.9-300 ARG HVERSION=6.2.6-300 ARG ARCHITECTURE=aarch64 -ARG URL='https://mirrors.kernel.org/fedora/releases/38/Everything/aarch64/os/Packages' +ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/38/Everything/aarch64/os/Packages' RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ @@ -19,6 +19,7 @@ RUN dnf groupinstall -y 'Development Tools' && \ curl -Lo headers.rpm ${URL}/k/kernel-headers-${HVERSION}.fc38.${ARCHITECTURE}.rpm && \ dnf install -y ./*.rpm && \ rm -v ./*.rpm && \ + dnf clean all && \ mkdir -p /lib/modules/${VERSION}.fc38.${ARCHITECTURE} && \ ln -s /usr/src/kernels/${VERSION}.fc38.${ARCHITECTURE}/ /lib/modules/${VERSION}.fc38.${ARCHITECTURE}/build && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ diff --git a/images/aarch64/fedora/6.2/Dockerfile.kernel b/images/aarch64/fedora/6.2/Dockerfile.kernel index f35cc2a..4167d85 100644 --- a/images/aarch64/fedora/6.2/Dockerfile.kernel +++ b/images/aarch64/fedora/6.2/Dockerfile.kernel @@ -1,7 +1,7 @@ ARG VERSION=6.2.9-300 ARG HVERSION=6.2.6-300 ARG ARCHITECTURE=aarch64 -ARG URL='https://mirrors.kernel.org/fedora/releases/38/Everything/aarch64/os/Packages/k/' +ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/38/Everything/aarch64/os/Packages/k/' FROM initrd-builder:0.0.1 AS stage1 @@ -40,7 +40,7 @@ RUN touch .placeholder && \ #extract-vmlinux $(find lib/modules -name vmlinuz) > /home/ubuntu/extracted/vmlinux -FROM fedora:38 as kmod-builder +FROM fedora:38 AS kmod-builder ARG VERSION ARG ARCHITECTURE From 7f8c9672aea715513466291ad30d6c2a0f2da0e2 Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 12:23:29 +0100 Subject: [PATCH 10/13] fix(images/aarch64/ubuntu/6.5): replace unavailable mirror and version Contextually, replace `rootfs` base image with `ubuntu:22.04`. Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/aarch64/ubuntu/6.5/Dockerfile | 13 +++---------- images/aarch64/ubuntu/6.5/Dockerfile.kernel | 5 ++--- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/images/aarch64/ubuntu/6.5/Dockerfile b/images/aarch64/ubuntu/6.5/Dockerfile index c58ba9d..c0df150 100644 --- a/images/aarch64/ubuntu/6.5/Dockerfile +++ b/images/aarch64/ubuntu/6.5/Dockerfile @@ -1,7 +1,7 @@ -FROM ubuntu:23.10 +FROM ubuntu:22.04 -ARG VERSION=6.5.0-17 -ARG URL='http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux/' +ARG VERSION=6.5.0-1024-aws +ARG URL='https://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-aws-6.5/' WORKDIR /home/ubuntu @@ -32,13 +32,6 @@ RUN apt-get update && apt-get install -y \ curl ${URL} | \ grep -E "linux-headers-${VERSION}|linux-tools-${VERSION}" | \ grep "arm64" | \ - grep -v "64k" | \ - cut -d\" -f8 | \ - xargs -I@ curl -LO ${URL}@ && \ - curl ${URL} | \ - grep -E "linux-headers-${VERSION}|linux-tools-common-${VERSION}" | \ - grep -E "_all.deb" | \ - grep -v "64k" | \ cut -d\" -f8 | \ xargs -I@ curl -LO ${URL}@ && \ find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \ diff --git a/images/aarch64/ubuntu/6.5/Dockerfile.kernel b/images/aarch64/ubuntu/6.5/Dockerfile.kernel index 10448f5..d7bb5ef 100644 --- a/images/aarch64/ubuntu/6.5/Dockerfile.kernel +++ b/images/aarch64/ubuntu/6.5/Dockerfile.kernel @@ -1,14 +1,13 @@ FROM initrd-builder:0.0.1 AS builder -ARG VERSION=6.5.0-17-generic -ARG URL='http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux/' +ARG VERSION=6.5.0-1024-aws +ARG URL='https://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-aws-6.5/' WORKDIR /home/ubuntu RUN touch .placeholder && \ curl ${URL} | \ grep 'arm64' | \ - grep -v '64k' | \ grep -oE "linux-image-unsigned-${VERSION}.*deb\"|linux-modules-${VERSION}.*deb\"" | \ tr -d '"' | \ xargs -I@ curl -LO ${URL}@ && \ From d2b93a7b6d36c1ff8762c6b9ab156571caaadeef Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 16:29:06 +0100 Subject: [PATCH 11/13] chore(images/builder): remove useless `source` directive The source directory works only for the current shell, and `gcc-9` is never used in that RUN step after activation, so remove the directive. Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/builder/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/builder/Dockerfile b/images/builder/Dockerfile index 8c50060..4a5b0f2 100644 --- a/images/builder/Dockerfile +++ b/images/builder/Dockerfile @@ -37,9 +37,9 @@ RUN yum install -y \ systemd \ tar \ wget \ - sed && \ - yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ && \ - source /opt/rh/devtoolset-9/enable + sed \ + devtoolset-9-gcc \ + devtoolset-9-gcc-c++ ARG CMAKE_VERSION=3.24.4 RUN curl -L -o /tmp/cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz && \ From fc1229268c3d30c9dfa279bc8b8a2820fbc85702 Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 15:19:00 +0100 Subject: [PATCH 12/13] chore(images): use bash as default and enable some safety options In order to be sure that shell instructions in RUN steps run as intended, replace the default shell at build time with bash, enabling some safety options (`-euo pipefail`). At the moment, this is done only on rootfs images and builders. Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/aarch64/amazonlinux2/5.4/Dockerfile | 3 +++ images/aarch64/amazonlinux2022/5.15/Dockerfile | 2 ++ images/aarch64/archlinux/4.14/Dockerfile | 5 ++++- images/aarch64/fedora/6.2/Dockerfile | 3 +++ images/aarch64/oraclelinux/4.14/Dockerfile | 3 +++ images/aarch64/oraclelinux/5.15/Dockerfile | 3 +++ images/aarch64/ubuntu/6.5/Dockerfile | 3 +++ images/builder/Dockerfile | 3 +++ images/modernprobe-builder/Dockerfile | 3 +++ images/x86_64/amazonlinux2/4.19/Dockerfile | 3 +++ images/x86_64/amazonlinux2/5.10/Dockerfile | 3 +++ images/x86_64/amazonlinux2/5.15/Dockerfile | 3 +++ images/x86_64/amazonlinux2/5.4/Dockerfile | 3 +++ images/x86_64/amazonlinux2022/5.15/Dockerfile | 2 ++ images/x86_64/amazonlinux2023/6.1/Dockerfile | 2 ++ images/x86_64/archlinux/5.18/Dockerfile | 5 ++++- images/x86_64/archlinux/6.0/Dockerfile | 5 ++++- images/x86_64/archlinux/6.7/Dockerfile | 5 ++++- images/x86_64/centos/3.10/Dockerfile | 3 +++ images/x86_64/centos/4.18/Dockerfile | 3 +++ images/x86_64/centos/5.14/Dockerfile | 3 +++ images/x86_64/fedora/5.17/Dockerfile | 3 +++ images/x86_64/fedora/5.8/Dockerfile | 3 +++ images/x86_64/fedora/6.2/Dockerfile | 3 +++ images/x86_64/oraclelinux/3.10/Dockerfile | 3 +++ images/x86_64/oraclelinux/4.14/Dockerfile | 3 +++ images/x86_64/oraclelinux/5.15/Dockerfile | 3 +++ images/x86_64/oraclelinux/5.4/Dockerfile | 3 +++ images/x86_64/ubuntu/4.15/Dockerfile | 3 +++ images/x86_64/ubuntu/5.8/Dockerfile | 3 +++ images/x86_64/ubuntu/6.2/Dockerfile | 3 +++ images/x86_64/ubuntu/6.5/Dockerfile | 3 +++ 32 files changed, 97 insertions(+), 4 deletions(-) diff --git a/images/aarch64/amazonlinux2/5.4/Dockerfile b/images/aarch64/amazonlinux2/5.4/Dockerfile index 757ac30..c0ce7b5 100644 --- a/images/aarch64/amazonlinux2/5.4/Dockerfile +++ b/images/aarch64/amazonlinux2/5.4/Dockerfile @@ -3,6 +3,9 @@ FROM amazonlinux:2 ARG VERSION=5.4.247-162.350 ARG URL='http://amazonlinux.us-east-1.amazonaws.com/2/extras/kernel-5.4/latest/aarch64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN yum install -y \ binutils-devel \ chrony \ diff --git a/images/aarch64/amazonlinux2022/5.15/Dockerfile b/images/aarch64/amazonlinux2022/5.15/Dockerfile index 2182368..ada52c7 100644 --- a/images/aarch64/amazonlinux2022/5.15/Dockerfile +++ b/images/aarch64/amazonlinux2022/5.15/Dockerfile @@ -3,6 +3,8 @@ FROM amazonlinux:2022 ARG VERSION=5.15.73-45.135 ARG URL='https://al2022-repos-us-east-1-9761ab97.s3.dualstack.us-east-1.amazonaws.com/core/mirrors/latest/aarch64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ diff --git a/images/aarch64/archlinux/4.14/Dockerfile b/images/aarch64/archlinux/4.14/Dockerfile index 2402d93..959cf39 100644 --- a/images/aarch64/archlinux/4.14/Dockerfile +++ b/images/aarch64/archlinux/4.14/Dockerfile @@ -3,6 +3,9 @@ FROM lopsided/archlinux:latest ARG VERSION=4.14.15-1 ARG URL='http://tardis.tiny-vps.com/aarm/packages' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + WORKDIR /home/ubuntu RUN pacman -Syyu --noconfirm && \ @@ -32,4 +35,4 @@ RUN pacman -Syyu --noconfirm && \ pacman -U --noconfirm ./headers.tar.xz && \ rm -v ./headers.tar.xz && \ ln -s /usr/lib/systemd/systemd /sbin/init && \ - yes | pacman -Scc || exit 0 + pacman -Scc --noconfirm || exit 0 diff --git a/images/aarch64/fedora/6.2/Dockerfile b/images/aarch64/fedora/6.2/Dockerfile index 878e32d..94af257 100644 --- a/images/aarch64/fedora/6.2/Dockerfile +++ b/images/aarch64/fedora/6.2/Dockerfile @@ -5,6 +5,9 @@ ARG HVERSION=6.2.6-300 ARG ARCHITECTURE=aarch64 ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/38/Everything/aarch64/os/Packages' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ clang \ diff --git a/images/aarch64/oraclelinux/4.14/Dockerfile b/images/aarch64/oraclelinux/4.14/Dockerfile index 253eeb0..afc7c60 100644 --- a/images/aarch64/oraclelinux/4.14/Dockerfile +++ b/images/aarch64/oraclelinux/4.14/Dockerfile @@ -3,6 +3,9 @@ FROM oraclelinux:7 ARG VERSION=4.14.35-2047.527.2 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL7/latest/aarch64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + COPY /dev.repo /etc/yum.repos.d/ RUN yum groupinstall -y 'Development Tools' && \ diff --git a/images/aarch64/oraclelinux/5.15/Dockerfile b/images/aarch64/oraclelinux/5.15/Dockerfile index 523e090..eb1ec35 100644 --- a/images/aarch64/oraclelinux/5.15/Dockerfile +++ b/images/aarch64/oraclelinux/5.15/Dockerfile @@ -4,6 +4,9 @@ ARG VERSION=5.15.0-8.91.4.1 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL9/baseos/latest/aarch64' ARG ARCHITECTURE='aarch64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN yum install -y \ binutils-devel \ clang \ diff --git a/images/aarch64/ubuntu/6.5/Dockerfile b/images/aarch64/ubuntu/6.5/Dockerfile index c0df150..281c603 100644 --- a/images/aarch64/ubuntu/6.5/Dockerfile +++ b/images/aarch64/ubuntu/6.5/Dockerfile @@ -3,6 +3,9 @@ FROM ubuntu:22.04 ARG VERSION=6.5.0-1024-aws ARG URL='https://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-aws-6.5/' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + WORKDIR /home/ubuntu RUN apt-get update && apt-get install -y \ diff --git a/images/builder/Dockerfile b/images/builder/Dockerfile index 4a5b0f2..9517cc4 100644 --- a/images/builder/Dockerfile +++ b/images/builder/Dockerfile @@ -3,6 +3,9 @@ FROM centos:7 # TARGETARCH is automatically set by BuildKit (arm64 or amd64) ARG TARGETARCH +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + COPY /dhclient.service /usr/lib/systemd/system/ # Fix broken mirrors - centos:7 eol diff --git a/images/modernprobe-builder/Dockerfile b/images/modernprobe-builder/Dockerfile index 0dcaceb..007b4e0 100644 --- a/images/modernprobe-builder/Dockerfile +++ b/images/modernprobe-builder/Dockerfile @@ -1,5 +1,8 @@ FROM fedora:latest +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + COPY /dhclient.service /usr/lib/systemd/system/ RUN dnf install -y \ diff --git a/images/x86_64/amazonlinux2/4.19/Dockerfile b/images/x86_64/amazonlinux2/4.19/Dockerfile index 58b49db..d5a1bbd 100644 --- a/images/x86_64/amazonlinux2/4.19/Dockerfile +++ b/images/x86_64/amazonlinux2/4.19/Dockerfile @@ -3,6 +3,9 @@ FROM amazonlinux:2 ARG VERSION=4.19.84-33.70 ARG URL='http://amazonlinux.us-east-1.amazonaws.com/2/extras/kernel-ng/latest/x86_64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN yum install -y \ binutils-devel \ clang \ diff --git a/images/x86_64/amazonlinux2/5.10/Dockerfile b/images/x86_64/amazonlinux2/5.10/Dockerfile index df18f97..c9f5b27 100644 --- a/images/x86_64/amazonlinux2/5.10/Dockerfile +++ b/images/x86_64/amazonlinux2/5.10/Dockerfile @@ -3,6 +3,9 @@ FROM amazonlinux:2 ARG VERSION=5.10.184-175.749 ARG URL='http://amazonlinux.us-east-1.amazonaws.com/2/extras/kernel-5.10/latest/x86_64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN yum install -y \ binutils-devel \ clang \ diff --git a/images/x86_64/amazonlinux2/5.15/Dockerfile b/images/x86_64/amazonlinux2/5.15/Dockerfile index ea6b966..ca879ef 100644 --- a/images/x86_64/amazonlinux2/5.15/Dockerfile +++ b/images/x86_64/amazonlinux2/5.15/Dockerfile @@ -3,6 +3,9 @@ FROM amazonlinux:2 ARG VERSION=5.15.117-73.143 ARG URL='http://amazonlinux.us-east-1.amazonaws.com/2/extras/kernel-5.15/latest/x86_64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN yum install -y \ binutils-devel \ clang \ diff --git a/images/x86_64/amazonlinux2/5.4/Dockerfile b/images/x86_64/amazonlinux2/5.4/Dockerfile index 91bc9f9..079183f 100644 --- a/images/x86_64/amazonlinux2/5.4/Dockerfile +++ b/images/x86_64/amazonlinux2/5.4/Dockerfile @@ -3,6 +3,9 @@ FROM amazonlinux:2 ARG VERSION=5.4.247-162.350 ARG URL='http://amazonlinux.us-east-1.amazonaws.com/2/extras/kernel-5.4/latest/x86_64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN yum install -y \ binutils-devel \ clang \ diff --git a/images/x86_64/amazonlinux2022/5.15/Dockerfile b/images/x86_64/amazonlinux2022/5.15/Dockerfile index 64d44c5..d6e4eaa 100644 --- a/images/x86_64/amazonlinux2022/5.15/Dockerfile +++ b/images/x86_64/amazonlinux2022/5.15/Dockerfile @@ -3,6 +3,8 @@ FROM amazonlinux:2022 ARG VERSION=5.15.73-45 ARG URL='https://al2022-repos-us-east-1-9761ab97.s3.dualstack.us-east-1.amazonaws.com/core/mirrors/latest/x86_64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ diff --git a/images/x86_64/amazonlinux2023/6.1/Dockerfile b/images/x86_64/amazonlinux2023/6.1/Dockerfile index 5fbe2f5..e200fe8 100644 --- a/images/x86_64/amazonlinux2023/6.1/Dockerfile +++ b/images/x86_64/amazonlinux2023/6.1/Dockerfile @@ -3,6 +3,8 @@ FROM amazonlinux:2023 ARG VERSION=6.1.34-58 ARG URL='https://cdn.amazonlinux.com/al2023/core/mirrors/latest/x86_64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ diff --git a/images/x86_64/archlinux/5.18/Dockerfile b/images/x86_64/archlinux/5.18/Dockerfile index 3bd9a57..20bd4b1 100644 --- a/images/x86_64/archlinux/5.18/Dockerfile +++ b/images/x86_64/archlinux/5.18/Dockerfile @@ -1,5 +1,8 @@ FROM archlinux/archlinux:base-20220807.0.72894 +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + WORKDIR /home/ubuntu RUN printf 'SigLevel = Never\nServer=https://archive.archlinux.org/repos/2022/08/04/$repo/os/$arch' > /etc/pacman.d/mirrorlist && \ @@ -17,7 +20,7 @@ pacman -Syyu --noconfirm && \ python \ rsync \ wget && \ - yes | pacman -Scc && \ + pacman -Scc --noconfirm && \ ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime && \ echo 'LANG=en_US.UTF-8' > /etc/locale.gen && \ locale-gen && \ diff --git a/images/x86_64/archlinux/6.0/Dockerfile b/images/x86_64/archlinux/6.0/Dockerfile index 6c3bfd3..6e715ad 100644 --- a/images/x86_64/archlinux/6.0/Dockerfile +++ b/images/x86_64/archlinux/6.0/Dockerfile @@ -1,5 +1,8 @@ FROM archlinux/archlinux:base-20221211.0.109768 +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + WORKDIR /home/ubuntu RUN printf 'SigLevel = Never\nServer=https://archive.archlinux.org/repos/2022/12/11/$repo/os/$arch' > /etc/pacman.d/mirrorlist && \ @@ -17,7 +20,7 @@ pacman -Syyu --noconfirm && \ python \ rsync \ wget && \ - yes | pacman -Scc && \ + pacman -Scc --noconfirm && \ ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime && \ echo 'LANG=en_US.UTF-8' > /etc/locale.gen && \ locale-gen && \ diff --git a/images/x86_64/archlinux/6.7/Dockerfile b/images/x86_64/archlinux/6.7/Dockerfile index 49a3ff6..dd145ba 100644 --- a/images/x86_64/archlinux/6.7/Dockerfile +++ b/images/x86_64/archlinux/6.7/Dockerfile @@ -1,5 +1,8 @@ FROM archlinux/archlinux:base-20240124.0.209208 +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + WORKDIR /home/ubuntu RUN printf 'SigLevel = Never\nServer=https://archive.archlinux.org/repos/2024/01/24/$repo/os/$arch' > /etc/pacman.d/mirrorlist && \ @@ -17,7 +20,7 @@ pacman -Syyu --noconfirm && \ python \ rsync \ wget && \ - yes | pacman -Scc && \ + pacman -Scc --noconfirm && \ ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime && \ echo 'LANG=en_US.UTF-8' > /etc/locale.gen && \ locale-gen && \ diff --git a/images/x86_64/centos/3.10/Dockerfile b/images/x86_64/centos/3.10/Dockerfile index bd2a6f5..466d67c 100644 --- a/images/x86_64/centos/3.10/Dockerfile +++ b/images/x86_64/centos/3.10/Dockerfile @@ -3,6 +3,9 @@ FROM centos:centos7.9.2009 ARG VERSION=3.10.0-1160 ARG BASEOS_URL='https://vault.centos.org/centos/7.9.2009/os/x86_64/Packages' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + # Fix broken mirrors. RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo; \ diff --git a/images/x86_64/centos/4.18/Dockerfile b/images/x86_64/centos/4.18/Dockerfile index b41c088..1e2223a 100644 --- a/images/x86_64/centos/4.18/Dockerfile +++ b/images/x86_64/centos/4.18/Dockerfile @@ -3,6 +3,9 @@ FROM quay.io/centos/centos:stream8 ARG VERSION=4.18.0-552 ARG BASEOS_URL='https://vault.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + # Fix broken mirrors. RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo; \ diff --git a/images/x86_64/centos/5.14/Dockerfile b/images/x86_64/centos/5.14/Dockerfile index 20fd220..a6a8ba7 100644 --- a/images/x86_64/centos/5.14/Dockerfile +++ b/images/x86_64/centos/5.14/Dockerfile @@ -3,6 +3,9 @@ FROM quay.io/centos/centos:stream9 ARG VERSION=5.14.0-648 ARG APPSTR_URL='http://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y --allowerasing \ clang \ diff --git a/images/x86_64/fedora/5.17/Dockerfile b/images/x86_64/fedora/5.17/Dockerfile index 6b677f1..0c387cc 100644 --- a/images/x86_64/fedora/5.17/Dockerfile +++ b/images/x86_64/fedora/5.17/Dockerfile @@ -4,6 +4,9 @@ ARG VERSION=5.17.5-300 ARG HVERSION=5.17.0-300 ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/36/Everything/x86_64/os/Packages' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ clang \ diff --git a/images/x86_64/fedora/5.8/Dockerfile b/images/x86_64/fedora/5.8/Dockerfile index 5149c7a..56b5e1e 100644 --- a/images/x86_64/fedora/5.8/Dockerfile +++ b/images/x86_64/fedora/5.8/Dockerfile @@ -4,6 +4,9 @@ ARG VERSION=5.8.15-301 ARG HVERSION=5.8.11-300 ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/33/Everything/x86_64/os/Packages' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ clang \ diff --git a/images/x86_64/fedora/6.2/Dockerfile b/images/x86_64/fedora/6.2/Dockerfile index 22d38d1..b332294 100644 --- a/images/x86_64/fedora/6.2/Dockerfile +++ b/images/x86_64/fedora/6.2/Dockerfile @@ -4,6 +4,9 @@ ARG VERSION=6.2.9-300 ARG HVERSION=6.2.6-300 ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/38/Everything/x86_64/os/Packages' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ clang \ diff --git a/images/x86_64/oraclelinux/3.10/Dockerfile b/images/x86_64/oraclelinux/3.10/Dockerfile index c0b6eb3..22bd41f 100644 --- a/images/x86_64/oraclelinux/3.10/Dockerfile +++ b/images/x86_64/oraclelinux/3.10/Dockerfile @@ -3,6 +3,9 @@ FROM oraclelinux:7 ARG VERSION=3.10.0-1160.92.1.0.2 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL7/MODRHCK/x86_64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + COPY /dev.repo /etc/yum.repos.d/ RUN yum install -y \ diff --git a/images/x86_64/oraclelinux/4.14/Dockerfile b/images/x86_64/oraclelinux/4.14/Dockerfile index a4c1fd6..10b2dcd 100644 --- a/images/x86_64/oraclelinux/4.14/Dockerfile +++ b/images/x86_64/oraclelinux/4.14/Dockerfile @@ -3,6 +3,9 @@ FROM oraclelinux:7 ARG VERSION=4.14.35-2047.526.2 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + COPY /dev.repo /etc/yum.repos.d/ RUN yum groupinstall -y 'Development Tools' && \ diff --git a/images/x86_64/oraclelinux/5.15/Dockerfile b/images/x86_64/oraclelinux/5.15/Dockerfile index f789e6d..eef833c 100644 --- a/images/x86_64/oraclelinux/5.15/Dockerfile +++ b/images/x86_64/oraclelinux/5.15/Dockerfile @@ -3,6 +3,9 @@ FROM oraclelinux:9 ARG VERSION=5.15.0-8.91.4.1 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL9/UEKR7/x86_64' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN yum install -y \ binutils-devel \ clang \ diff --git a/images/x86_64/oraclelinux/5.4/Dockerfile b/images/x86_64/oraclelinux/5.4/Dockerfile index 59d7964..18eab9f 100644 --- a/images/x86_64/oraclelinux/5.4/Dockerfile +++ b/images/x86_64/oraclelinux/5.4/Dockerfile @@ -3,6 +3,9 @@ FROM oraclelinux:8 ARG VERSION=5.4.17-2136.320.7.1 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL8/UEKR6/x86_64/' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + RUN yum install -y \ binutils-devel \ clang \ diff --git a/images/x86_64/ubuntu/4.15/Dockerfile b/images/x86_64/ubuntu/4.15/Dockerfile index bb9bff2..7c9c4ab 100644 --- a/images/x86_64/ubuntu/4.15/Dockerfile +++ b/images/x86_64/ubuntu/4.15/Dockerfile @@ -3,6 +3,9 @@ FROM ubuntu:18.04 ARG VERSION=4.15.0-1118-aws ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws/' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + WORKDIR /home/ubuntu RUN apt-get update && apt-get install -y \ diff --git a/images/x86_64/ubuntu/5.8/Dockerfile b/images/x86_64/ubuntu/5.8/Dockerfile index 025ea25..31d43cd 100644 --- a/images/x86_64/ubuntu/5.8/Dockerfile +++ b/images/x86_64/ubuntu/5.8/Dockerfile @@ -2,6 +2,9 @@ FROM ubuntu:20.04 ARG VERSION=5.8.0-1041-aws +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + WORKDIR /home/ubuntu RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ diff --git a/images/x86_64/ubuntu/6.2/Dockerfile b/images/x86_64/ubuntu/6.2/Dockerfile index cb30c67..3f48cc4 100644 --- a/images/x86_64/ubuntu/6.2/Dockerfile +++ b/images/x86_64/ubuntu/6.2/Dockerfile @@ -3,6 +3,9 @@ FROM ubuntu:22.04 ARG VERSION=6.2.0-1018-aws ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws-6.2/' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + WORKDIR /home/ubuntu RUN apt-get update && apt-get install -y \ diff --git a/images/x86_64/ubuntu/6.5/Dockerfile b/images/x86_64/ubuntu/6.5/Dockerfile index cb718e2..c4893a1 100644 --- a/images/x86_64/ubuntu/6.5/Dockerfile +++ b/images/x86_64/ubuntu/6.5/Dockerfile @@ -3,6 +3,9 @@ FROM ubuntu:22.04 ARG VERSION=6.5.0-1024-aws ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws-6.5/' +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + WORKDIR /home/ubuntu RUN apt-get update && apt-get install -y \ From 3744a2997076bfcec8ff20e05d6de1bd40e49f55 Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Tue, 16 Dec 2025 18:19:42 +0100 Subject: [PATCH 13/13] chore(images): install pinned `cmake` version in rootfs/builder images Install the same `cmake` version in rootfs and builder (`builder` and `modernprobe-builder` images. The `cmake` version to be installed is passed to Dockerfiles through build-args, and is kept in a separate `images/CMAKE_VERSION` file. User can override it at build time using `make CMAKE_VERSION=...`. Signed-off-by: Leonardo Di Giovanna Co-Authored-By: irozzo-1A --- images/CMAKE_VERSION | 1 + images/Makefile | 29 ++++++++++++++----- images/README.md | 3 ++ images/aarch64/amazonlinux2/5.4/Dockerfile | 10 +++---- .../aarch64/amazonlinux2022/5.15/Dockerfile | 6 +++- images/aarch64/archlinux/4.14/Dockerfile | 6 +++- images/aarch64/fedora/6.2/Dockerfile | 6 +++- images/aarch64/oraclelinux/4.14/Dockerfile | 10 +++---- images/aarch64/oraclelinux/5.15/Dockerfile | 10 +++---- images/aarch64/ubuntu/6.5/Dockerfile | 7 +++-- images/builder/Dockerfile | 11 +++---- images/modernprobe-builder/Dockerfile | 6 +++- images/x86_64/amazonlinux2/4.19/Dockerfile | 10 +++---- images/x86_64/amazonlinux2/5.10/Dockerfile | 10 +++---- images/x86_64/amazonlinux2/5.15/Dockerfile | 10 +++---- images/x86_64/amazonlinux2/5.4/Dockerfile | 10 +++---- images/x86_64/amazonlinux2022/5.15/Dockerfile | 6 +++- images/x86_64/amazonlinux2023/6.1/Dockerfile | 6 +++- images/x86_64/archlinux/5.18/Dockerfile | 7 ++++- images/x86_64/archlinux/6.0/Dockerfile | 7 ++++- images/x86_64/archlinux/6.7/Dockerfile | 7 ++++- images/x86_64/centos/3.10/Dockerfile | 11 ++++--- images/x86_64/centos/4.18/Dockerfile | 6 +++- images/x86_64/centos/5.14/Dockerfile | 6 +++- images/x86_64/fedora/5.17/Dockerfile | 6 +++- images/x86_64/fedora/5.8/Dockerfile | 6 +++- images/x86_64/fedora/6.2/Dockerfile | 6 +++- images/x86_64/oraclelinux/3.10/Dockerfile | 10 +++---- images/x86_64/oraclelinux/4.14/Dockerfile | 10 +++---- images/x86_64/oraclelinux/5.15/Dockerfile | 10 +++---- images/x86_64/oraclelinux/5.4/Dockerfile | 10 +++---- images/x86_64/ubuntu/4.15/Dockerfile | 12 ++++---- images/x86_64/ubuntu/5.8/Dockerfile | 6 +++- images/x86_64/ubuntu/6.2/Dockerfile | 6 +++- images/x86_64/ubuntu/6.5/Dockerfile | 6 +++- 35 files changed, 188 insertions(+), 101 deletions(-) create mode 100644 images/CMAKE_VERSION diff --git a/images/CMAKE_VERSION b/images/CMAKE_VERSION new file mode 100644 index 0000000..057aa0d --- /dev/null +++ b/images/CMAKE_VERSION @@ -0,0 +1 @@ +3.24.4 \ No newline at end of file diff --git a/images/Makefile b/images/Makefile index b2440cc..cb7346a 100644 --- a/images/Makefile +++ b/images/Makefile @@ -6,16 +6,20 @@ CLEANUP ?= false REPOSITORY ?= ghcr.io/falcosecurity/kernel-testing ARCH ?= $(shell uname -m) YAML_FILE ?= images.yaml +CMAKE_VERSION ?= $(shell cat CMAKE_VERSION) .PHONY: build-rootfs build-kernel generate-yaml build-all initrd-builder modernprobe-builder builder builder: if [ "$(DRY_RUN)" = "true" ]; then \ - echo "Dry run: Building builder image: docker build -t $(REPOSITORY)/builder:$(ARCH)-$(TAG)"; \ + echo "Dry run: Building builder image: docker build -t $(REPOSITORY)/builder:$(ARCH)-$(TAG) --build-arg CMAKE_VERSION=\"$(CMAKE_VERSION)\" builder"; \ else \ echo "Building builder image"; \ image=$(REPOSITORY)/builder:$(ARCH); \ - docker build -t $$image-$(TAG) builder || echo "FAIL: $$image-$(TAG)" >> failed.txt; \ + docker build \ + -t $$image-$(TAG) \ + --build-arg CMAKE_VERSION="$(CMAKE_VERSION)" \ + builder || echo "FAIL: $$image-$(TAG)" >> failed.txt; \ if [ "$(PUSH)" = "true" ]; then \ echo "Pushing image: $$image-$(TAG)"; \ docker push $$image-$(TAG); \ @@ -29,11 +33,14 @@ builder: modernprobe-builder: if [ "$(DRY_RUN)" = "true" ]; then \ - echo "Dry run: Building modernprobe-builder image: docker build -t $(REPOSITORY)/modernprobe-builder:$(ARCH)-$(TAG) modernprobe-builder"; \ + echo "Dry run: Building modernprobe-builder image: docker build -t $(REPOSITORY)/modernprobe-builder:$(ARCH)-$(TAG) --build-arg CMAKE_VERSION=\"$(CMAKE_VERSION)\" modernprobe-builder"; \ else \ echo "Building modernprobe-builder image"; \ image=$(REPOSITORY)/modernprobe-builder:$(ARCH); \ - docker build -t $$image-$(TAG) modernprobe-builder || echo "FAIL: $$image-$(TAG)" >> failed.txt; \ + docker build \ + -t $$image-$(TAG) \ + --build-arg CMAKE_VERSION="$(CMAKE_VERSION)" \ + modernprobe-builder || echo "FAIL: $$image-$(TAG)" >> failed.txt; \ if [ "$(PUSH)" = "true" ]; then \ echo "Pushing image: $$image-$(TAG)"; \ docker push $$image-$(TAG); \ @@ -60,10 +67,13 @@ build-rootfs: distro=$$(basename $$(dirname $$rootfs_dir)); \ image=$(REPOSITORY)/$$distro-image:$$version-$(ARCH); \ if [ "$(DRY_RUN)" = "true" ]; then \ - echo "Dry run: Building rootfs image: docker build -t $$image-$(TAG) $$rootfs_dir"; \ + echo "Dry run: Building rootfs image: docker build -t $$image-$(TAG) --build-arg CMAKE_VERSION=\"$(CMAKE_VERSION)\" $$rootfs_dir"; \ else \ echo "Building rootfs image: $$image-$(TAG)"; \ - docker build -t $$image-$(TAG) $$rootfs_dir || echo "FAIL: $$image-$(TAG)" >> failed.txt; \ + docker build \ + -t $$image-$(TAG) \ + --build-arg CMAKE_VERSION="$(CMAKE_VERSION)" \ + $$rootfs_dir || echo "FAIL: $$image-$(TAG)" >> failed.txt; \ if [ "$(PUSH)" = "true" ]; then \ echo "Pushing image: $$image-$(TAG)"; \ docker push $$image-$(TAG); \ @@ -120,10 +130,13 @@ build-kernel: initrd-builder kernel_image=$(REPOSITORY)/$$distro-kernel:$$version-$$arch; \ if [ -n "$$rootfs_dir" ]; then \ if [ "$(DRY_RUN)" = "true" ]; then \ - echo "Dry run: Building rootfs image: docker build -t $$rootfs_image $$rootfs_dir"; \ + echo "Dry run: Building rootfs image: docker build -t $$rootfs_image --build-arg CMAKE_VERSION=\"$(CMAKE_VERSION)\" $$rootfs_dir"; \ else \ echo "Building rootfs image: $$rootfs_image"; \ - docker build -t $$rootfs_image $$rootfs_dir; \ + docker build \ + -t $$rootfs_image \ + --build-arg CMAKE_VERSION="$(CMAKE_VERSION)" \ + $$rootfs_dir; \ if [ "$(PUSH)" = "true" ]; then \ echo "Pushing image: $$rootfs_image"; \ docker push $$rootfs_image; \ diff --git a/images/README.md b/images/README.md index 038e745..80d86df 100644 --- a/images/README.md +++ b/images/README.md @@ -98,4 +98,7 @@ You can customize the Makefile to suit your specific requirements. The variables - `YAML_FILE`: The name of the YAML file that will be generated by the `generate-yaml` target. +- `CMAKE_VERSION`: The specific cmake version to install inside the images. This affects rootfs and builder images +build. By default, it is set to the content of the [CMAKE_VERSION](./CMAKE_VERSION) file. + Feel free to adjust these variables to match your desired configuration. diff --git a/images/aarch64/amazonlinux2/5.4/Dockerfile b/images/aarch64/amazonlinux2/5.4/Dockerfile index c0ce7b5..9bb520b 100644 --- a/images/aarch64/amazonlinux2/5.4/Dockerfile +++ b/images/aarch64/amazonlinux2/5.4/Dockerfile @@ -2,6 +2,7 @@ FROM amazonlinux:2 ARG VERSION=5.4.247-162.350 ARG URL='http://amazonlinux.us-east-1.amazonaws.com/2/extras/kernel-5.4/latest/aarch64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -32,14 +33,13 @@ RUN yum install -y \ xargs -I@ curl -Lo sources.rpm ${URL}/@ && \ yum install -y ./*.rpm && \ rm -v ./*.rpm && \ + CMAKE_ARCH="aarch64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ - curl -LO https://cmake.org/files/v3.19/cmake-3.19.8-Linux-aarch64.tar.gz && \ - tar -xaf cmake-3.19.8-Linux-aarch64.tar.gz && \ - rm -vf cmake-3.19.8-Linux-aarch64.tar.gz && \ - mv cmake-3.19.8-Linux-aarch64 /opt/cmake-3.19.8 && \ - ln -sf /opt/cmake-3.19.8/bin/* /usr/bin/ && \ mkdir -p /lib/modules/${VERSION}.amzn2.aarch64/ && \ ln -s /usr/src/kernels/${VERSION}.amzn2.aarch64/ /lib/modules/${VERSION}.amzn2.aarch64/build && \ rm -vf /usr/bin/gcc /usr/bin/g++ && \ diff --git a/images/aarch64/amazonlinux2022/5.15/Dockerfile b/images/aarch64/amazonlinux2022/5.15/Dockerfile index ada52c7..2584425 100644 --- a/images/aarch64/amazonlinux2022/5.15/Dockerfile +++ b/images/aarch64/amazonlinux2022/5.15/Dockerfile @@ -2,6 +2,7 @@ FROM amazonlinux:2022 ARG VERSION=5.15.73-45.135 ARG URL='https://al2022-repos-us-east-1-9761ab97.s3.dualstack.us-east-1.amazonaws.com/core/mirrors/latest/aarch64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -11,7 +12,6 @@ RUN dnf groupinstall -y 'Development Tools' && \ binutils-devel \ chrony \ clang \ - cmake \ iproute \ kmod \ libcap-devel \ @@ -30,6 +30,10 @@ RUN dnf groupinstall -y 'Development Tools' && \ xargs -I@ curl -Lo sources.rpm ${URL}@ && \ dnf install -y ./*.rpm && \ rm -f ./*.rpm && \ + CMAKE_ARCH="aarch64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.amzn2022.aarch64/ && \ ln -s /usr/src/kernels/${VERSION}.amzn2022.aarch64/ /lib/modules/${VERSION}.amzn2022.aarch64/build && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ diff --git a/images/aarch64/archlinux/4.14/Dockerfile b/images/aarch64/archlinux/4.14/Dockerfile index 959cf39..f688ea5 100644 --- a/images/aarch64/archlinux/4.14/Dockerfile +++ b/images/aarch64/archlinux/4.14/Dockerfile @@ -2,6 +2,7 @@ FROM lopsided/archlinux:latest ARG VERSION=4.14.15-1 ARG URL='http://tardis.tiny-vps.com/aarm/packages' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -11,7 +12,6 @@ WORKDIR /home/ubuntu RUN pacman -Syyu --noconfirm && \ pacman -S --noconfirm \ clang \ - cmake \ gcc \ git \ libcap \ @@ -22,6 +22,10 @@ RUN pacman -Syyu --noconfirm && \ rsync \ systemd \ wget && \ + CMAKE_ARCH="aarch64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime && \ echo 'LANG=en_US.UTF-8' > /etc/locale.gen && \ locale-gen && \ diff --git a/images/aarch64/fedora/6.2/Dockerfile b/images/aarch64/fedora/6.2/Dockerfile index 94af257..d1d7ece 100644 --- a/images/aarch64/fedora/6.2/Dockerfile +++ b/images/aarch64/fedora/6.2/Dockerfile @@ -4,6 +4,7 @@ ARG VERSION=6.2.9-300 ARG HVERSION=6.2.6-300 ARG ARCHITECTURE=aarch64 ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/38/Everything/aarch64/os/Packages' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -11,7 +12,6 @@ SHELL ["/bin/bash", "-euo", "pipefail", "-c"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ clang \ - cmake \ iproute \ libcap-devel \ llvm \ @@ -23,6 +23,10 @@ RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y ./*.rpm && \ rm -v ./*.rpm && \ dnf clean all && \ + CMAKE_ARCH="aarch64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.fc38.${ARCHITECTURE} && \ ln -s /usr/src/kernels/${VERSION}.fc38.${ARCHITECTURE}/ /lib/modules/${VERSION}.fc38.${ARCHITECTURE}/build && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ diff --git a/images/aarch64/oraclelinux/4.14/Dockerfile b/images/aarch64/oraclelinux/4.14/Dockerfile index afc7c60..ee858c7 100644 --- a/images/aarch64/oraclelinux/4.14/Dockerfile +++ b/images/aarch64/oraclelinux/4.14/Dockerfile @@ -2,6 +2,7 @@ FROM oraclelinux:7 ARG VERSION=4.14.35-2047.527.2 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL7/latest/aarch64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -32,11 +33,10 @@ RUN yum groupinstall -y 'Development Tools' && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ - curl -LO https://cmake.org/files/v3.19/cmake-3.19.8-Linux-aarch64.tar.gz && \ - tar -xaf cmake-3.19.8-Linux-aarch64.tar.gz && \ - rm -vf cmake-3.19.8-Linux-aarch64.tar.gz && \ - mv cmake-3.19.8-Linux-aarch64 /opt/cmake-3.19.8 && \ - ln -sf /opt/cmake-3.19.8/bin/* /usr/bin/ && \ + CMAKE_ARCH="aarch64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.el7uek.aarch64/ && \ ln -s /usr/src/kernels/${VERSION}.el7uek.aarch64/ /lib/modules/${VERSION}.el7uek.aarch64/build && \ yum clean all && \ diff --git a/images/aarch64/oraclelinux/5.15/Dockerfile b/images/aarch64/oraclelinux/5.15/Dockerfile index eb1ec35..81fc911 100644 --- a/images/aarch64/oraclelinux/5.15/Dockerfile +++ b/images/aarch64/oraclelinux/5.15/Dockerfile @@ -3,6 +3,7 @@ FROM oraclelinux:9 ARG VERSION=5.15.0-8.91.4.1 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL9/baseos/latest/aarch64' ARG ARCHITECTURE='aarch64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -28,10 +29,9 @@ RUN yum install -y \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ - curl -LO https://cmake.org/files/v3.19/cmake-3.19.8-Linux-aarch64.tar.gz && \ - tar -xaf cmake-3.19.8-Linux-aarch64.tar.gz && \ - rm -vf cmake-3.19.8-Linux-aarch64.tar.gz && \ - mv cmake-3.19.8-Linux-aarch64 /opt/cmake-3.19.8 && \ - ln -sf /opt/cmake-3.19.8/bin/* /usr/bin/ && \ + CMAKE_ARCH="aarch64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/5.15.0-8.91.4.1.el9uek.${ARCHITECTURE}/ && \ ln -s /usr/src/kernels/5.15.0-8.91.4.1.el9uek.${ARCHITECTURE}/ /lib/modules/5.15.0-8.91.4.1.el9uek.${ARCHITECTURE}/build diff --git a/images/aarch64/ubuntu/6.5/Dockerfile b/images/aarch64/ubuntu/6.5/Dockerfile index 281c603..fe59fbb 100644 --- a/images/aarch64/ubuntu/6.5/Dockerfile +++ b/images/aarch64/ubuntu/6.5/Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:22.04 ARG VERSION=6.5.0-1024-aws ARG URL='https://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-aws-6.5/' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -11,8 +12,6 @@ WORKDIR /home/ubuntu RUN apt-get update && apt-get install -y \ build-essential \ clang \ - cmake \ - curl \ curl \ dbus \ git \ @@ -39,6 +38,10 @@ RUN apt-get update && apt-get install -y \ xargs -I@ curl -LO ${URL}@ && \ find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \ rm -f *.deb && \ + CMAKE_ARCH="aarch64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ sed -ie '/^ConditionVirtualization.*/d' /lib/systemd/system/systemd-timesyncd.service && \ echo "" > /etc/machine-id && echo "" > /var/lib/dbus/machine-id && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ diff --git a/images/builder/Dockerfile b/images/builder/Dockerfile index 9517cc4..0b3e425 100644 --- a/images/builder/Dockerfile +++ b/images/builder/Dockerfile @@ -2,6 +2,7 @@ FROM centos:7 # TARGETARCH is automatically set by BuildKit (arm64 or amd64) ARG TARGETARCH +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -24,7 +25,6 @@ RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ fi RUN yum install -y \ - cmake \ curl \ dhclient \ gcc \ @@ -44,12 +44,9 @@ RUN yum install -y \ devtoolset-9-gcc \ devtoolset-9-gcc-c++ -ARG CMAKE_VERSION=3.24.4 -RUN curl -L -o /tmp/cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz && \ - gzip -d /tmp/cmake.tar.gz && \ - tar -xpf /tmp/cmake.tar --directory=/tmp && \ - cp -R /tmp/cmake-${CMAKE_VERSION}-linux-$(uname -m)/* /usr && \ - rm -rf /tmp/cmake-${CMAKE_VERSION}-linux-$(uname -m) cmake.tar && \ +RUN CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-$(uname -m)" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ yum clean all && \ rm -rf /var/cache/yum /usr/man /usr/doc && \ systemctl enable dhclient && \ diff --git a/images/modernprobe-builder/Dockerfile b/images/modernprobe-builder/Dockerfile index 007b4e0..fc456c5 100644 --- a/images/modernprobe-builder/Dockerfile +++ b/images/modernprobe-builder/Dockerfile @@ -1,5 +1,7 @@ FROM fedora:latest +ARG CMAKE_VERSION + # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -12,7 +14,6 @@ RUN dnf install -y \ bpftool \ ca-certificates \ clang \ - cmake \ dhclient \ gcc \ gcc-c++ \ @@ -26,6 +27,9 @@ RUN dnf install -y \ systemd && \ dnf clean all && \ rm -rf /var/cache/yum && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-$(uname -m)" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ systemctl enable dhclient && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ diff --git a/images/x86_64/amazonlinux2/4.19/Dockerfile b/images/x86_64/amazonlinux2/4.19/Dockerfile index d5a1bbd..197e576 100644 --- a/images/x86_64/amazonlinux2/4.19/Dockerfile +++ b/images/x86_64/amazonlinux2/4.19/Dockerfile @@ -2,6 +2,7 @@ FROM amazonlinux:2 ARG VERSION=4.19.84-33.70 ARG URL='http://amazonlinux.us-east-1.amazonaws.com/2/extras/kernel-ng/latest/x86_64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -31,14 +32,13 @@ RUN yum install -y \ xargs -I@ curl -Lo sources.rpm ${URL}/@ && \ yum install -y ./*.rpm && \ rm -v ./*.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ - curl -LO https://cmake.org/files/v3.16/cmake-3.16.7-Linux-x86_64.tar.gz && \ - tar -xaf cmake-3.16.7-Linux-x86_64.tar.gz && \ - rm -vf cmake-3.16.7-Linux-x86_64.tar.gz && \ - mv cmake-3.16.7-Linux-x86_64 /opt/cmake-3.16.7 && \ - ln -sf /opt/cmake-3.16.7/bin/* /usr/bin/ && \ mkdir -p /lib/modules/${VERSION}.amzn2.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.amzn2.x86_64/ /lib/modules/${VERSION}.amzn2.x86_64/build && \ rm -vf /usr/bin/gcc /usr/bin/g++ && \ diff --git a/images/x86_64/amazonlinux2/5.10/Dockerfile b/images/x86_64/amazonlinux2/5.10/Dockerfile index c9f5b27..04bfe2f 100644 --- a/images/x86_64/amazonlinux2/5.10/Dockerfile +++ b/images/x86_64/amazonlinux2/5.10/Dockerfile @@ -2,6 +2,7 @@ FROM amazonlinux:2 ARG VERSION=5.10.184-175.749 ARG URL='http://amazonlinux.us-east-1.amazonaws.com/2/extras/kernel-5.10/latest/x86_64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -31,14 +32,13 @@ RUN yum install -y \ xargs -I@ curl -Lo sources.rpm ${URL}/@ && \ yum install -y ./*.rpm && \ rm -v ./*.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ - curl -LO https://cmake.org/files/v3.16/cmake-3.16.7-Linux-x86_64.tar.gz && \ - tar -xaf cmake-3.16.7-Linux-x86_64.tar.gz && \ - rm -vf cmake-3.16.7-Linux-x86_64.tar.gz && \ - mv cmake-3.16.7-Linux-x86_64 /opt/cmake-3.16.7 && \ - ln -sf /opt/cmake-3.16.7/bin/* /usr/bin/ && \ mkdir -p /lib/modules/${VERSION}.amzn2.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.amzn2.x86_64/ /lib/modules/${VERSION}.amzn2.x86_64/build && \ rm -vf /usr/bin/gcc /usr/bin/g++ && \ diff --git a/images/x86_64/amazonlinux2/5.15/Dockerfile b/images/x86_64/amazonlinux2/5.15/Dockerfile index ca879ef..759dfa3 100644 --- a/images/x86_64/amazonlinux2/5.15/Dockerfile +++ b/images/x86_64/amazonlinux2/5.15/Dockerfile @@ -2,6 +2,7 @@ FROM amazonlinux:2 ARG VERSION=5.15.117-73.143 ARG URL='http://amazonlinux.us-east-1.amazonaws.com/2/extras/kernel-5.15/latest/x86_64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -31,14 +32,13 @@ RUN yum install -y \ xargs -I@ curl -Lo sources.rpm ${URL}/@ && \ yum install -y ./*.rpm && \ rm -v ./*.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ - curl -LO https://cmake.org/files/v3.16/cmake-3.16.7-Linux-x86_64.tar.gz && \ - tar -xaf cmake-3.16.7-Linux-x86_64.tar.gz && \ - rm -vf cmake-3.16.7-Linux-x86_64.tar.gz && \ - mv cmake-3.16.7-Linux-x86_64 /opt/cmake-3.16.7 && \ - ln -sf /opt/cmake-3.16.7/bin/* /usr/bin/ && \ mkdir -p /lib/modules/${VERSION}.amzn2.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.amzn2.x86_64/ /lib/modules/${VERSION}.amzn2.x86_64/build && \ rm -vf /usr/bin/gcc /usr/bin/g++ && \ diff --git a/images/x86_64/amazonlinux2/5.4/Dockerfile b/images/x86_64/amazonlinux2/5.4/Dockerfile index 079183f..7c560ad 100644 --- a/images/x86_64/amazonlinux2/5.4/Dockerfile +++ b/images/x86_64/amazonlinux2/5.4/Dockerfile @@ -2,6 +2,7 @@ FROM amazonlinux:2 ARG VERSION=5.4.247-162.350 ARG URL='http://amazonlinux.us-east-1.amazonaws.com/2/extras/kernel-5.4/latest/x86_64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -31,14 +32,13 @@ RUN yum install -y \ xargs -I@ curl -Lo sources.rpm ${URL}/@ && \ yum install -y ./*.rpm && \ rm -v ./*.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ - curl -LO https://cmake.org/files/v3.16/cmake-3.16.7-Linux-x86_64.tar.gz && \ - tar -xaf cmake-3.16.7-Linux-x86_64.tar.gz && \ - rm -vf cmake-3.16.7-Linux-x86_64.tar.gz && \ - mv cmake-3.16.7-Linux-x86_64 /opt/cmake-3.16.7 && \ - ln -sf /opt/cmake-3.16.7/bin/* /usr/bin/ && \ mkdir -p /lib/modules/${VERSION}.amzn2.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.amzn2.x86_64/ /lib/modules/${VERSION}.amzn2.x86_64/build && \ rm -vf /usr/bin/gcc /usr/bin/g++ && \ diff --git a/images/x86_64/amazonlinux2022/5.15/Dockerfile b/images/x86_64/amazonlinux2022/5.15/Dockerfile index d6e4eaa..c63e61b 100644 --- a/images/x86_64/amazonlinux2022/5.15/Dockerfile +++ b/images/x86_64/amazonlinux2022/5.15/Dockerfile @@ -2,6 +2,7 @@ FROM amazonlinux:2022 ARG VERSION=5.15.73-45 ARG URL='https://al2022-repos-us-east-1-9761ab97.s3.dualstack.us-east-1.amazonaws.com/core/mirrors/latest/x86_64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -10,7 +11,6 @@ RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ binutils-devel \ clang \ - cmake \ iproute \ kmod \ libcap-devel \ @@ -31,6 +31,10 @@ RUN dnf groupinstall -y 'Development Tools' && \ rm -vf ./*.rpm && \ dnf clean all && \ rm -rf /var/cache/yum && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.135.amzn2022.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.135.amzn2022.x86_64/ /lib/modules/${VERSION}.135.amzn2022.x86_64/build && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ diff --git a/images/x86_64/amazonlinux2023/6.1/Dockerfile b/images/x86_64/amazonlinux2023/6.1/Dockerfile index e200fe8..050b62e 100644 --- a/images/x86_64/amazonlinux2023/6.1/Dockerfile +++ b/images/x86_64/amazonlinux2023/6.1/Dockerfile @@ -2,6 +2,7 @@ FROM amazonlinux:2023 ARG VERSION=6.1.34-58 ARG URL='https://cdn.amazonlinux.com/al2023/core/mirrors/latest/x86_64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -10,7 +11,6 @@ RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ binutils-devel \ clang \ - cmake \ iproute \ kmod \ libcap-devel \ @@ -31,6 +31,10 @@ RUN dnf groupinstall -y 'Development Tools' && \ rm -vf ./headers.rpm ./sources.rpm && \ dnf clean all && \ rm -rf /var/cache/yum && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.102.amzn2023.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.102.amzn2023.x86_64/ /lib/modules/${VERSION}.102.amzn2023.x86_64/build && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ diff --git a/images/x86_64/archlinux/5.18/Dockerfile b/images/x86_64/archlinux/5.18/Dockerfile index 20bd4b1..8b0cd0f 100644 --- a/images/x86_64/archlinux/5.18/Dockerfile +++ b/images/x86_64/archlinux/5.18/Dockerfile @@ -1,5 +1,7 @@ FROM archlinux/archlinux:base-20220807.0.72894 +ARG CMAKE_VERSION + # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -9,7 +11,6 @@ RUN printf 'SigLevel = Never\nServer=https://archive.archlinux.org/repos/2022/08 pacman -Syyu --noconfirm && \ pacman -S --noconfirm \ clang \ - cmake \ gcc \ git \ libcap \ @@ -21,6 +22,10 @@ pacman -Syyu --noconfirm && \ rsync \ wget && \ pacman -Scc --noconfirm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime && \ echo 'LANG=en_US.UTF-8' > /etc/locale.gen && \ locale-gen && \ diff --git a/images/x86_64/archlinux/6.0/Dockerfile b/images/x86_64/archlinux/6.0/Dockerfile index 6e715ad..c4232f1 100644 --- a/images/x86_64/archlinux/6.0/Dockerfile +++ b/images/x86_64/archlinux/6.0/Dockerfile @@ -1,5 +1,7 @@ FROM archlinux/archlinux:base-20221211.0.109768 +ARG CMAKE_VERSION + # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -9,7 +11,6 @@ RUN printf 'SigLevel = Never\nServer=https://archive.archlinux.org/repos/2022/12 pacman -Syyu --noconfirm && \ pacman -S --noconfirm \ clang \ - cmake \ gcc \ git \ libcap \ @@ -21,6 +22,10 @@ pacman -Syyu --noconfirm && \ rsync \ wget && \ pacman -Scc --noconfirm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime && \ echo 'LANG=en_US.UTF-8' > /etc/locale.gen && \ locale-gen && \ diff --git a/images/x86_64/archlinux/6.7/Dockerfile b/images/x86_64/archlinux/6.7/Dockerfile index dd145ba..5d7b840 100644 --- a/images/x86_64/archlinux/6.7/Dockerfile +++ b/images/x86_64/archlinux/6.7/Dockerfile @@ -1,5 +1,7 @@ FROM archlinux/archlinux:base-20240124.0.209208 +ARG CMAKE_VERSION + # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -9,7 +11,6 @@ RUN printf 'SigLevel = Never\nServer=https://archive.archlinux.org/repos/2024/01 pacman -Syyu --noconfirm && \ pacman -S --noconfirm \ clang \ - cmake \ gcc \ git \ libcap \ @@ -21,6 +22,10 @@ pacman -Syyu --noconfirm && \ rsync \ wget && \ pacman -Scc --noconfirm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime && \ echo 'LANG=en_US.UTF-8' > /etc/locale.gen && \ locale-gen && \ diff --git a/images/x86_64/centos/3.10/Dockerfile b/images/x86_64/centos/3.10/Dockerfile index 466d67c..e70972c 100644 --- a/images/x86_64/centos/3.10/Dockerfile +++ b/images/x86_64/centos/3.10/Dockerfile @@ -2,6 +2,7 @@ FROM centos:centos7.9.2009 ARG VERSION=3.10.0-1160 ARG BASEOS_URL='https://vault.centos.org/centos/7.9.2009/os/x86_64/Packages' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -13,7 +14,6 @@ RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ RUN yum group install -y "Development Tools" && \ yum install -y \ - cmake \ curl \ gcc \ git \ @@ -28,13 +28,12 @@ RUN yum group install -y "Development Tools" && \ curl -Lo headers.rpm ${BASEOS_URL}/kernel-devel-${VERSION}.el7.x86_64.rpm && \ yum install -y ./headers.rpm && \ rm -f ./headers.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.el7.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.el7.x86_64/ /lib/modules/${VERSION}.el7.x86_64/build && \ - curl -LO https://cmake.org/files/v3.16/cmake-3.16.7-Linux-x86_64.tar.gz && \ - tar -xaf cmake-3.16.7-Linux-x86_64.tar.gz && \ - rm -vf cmake-3.16.7-Linux-x86_64.tar.gz && \ - mv cmake-3.16.7-Linux-x86_64 /opt/cmake-3.16.7 && \ - ln -sf /opt/cmake-3.16.7/bin/* /usr/bin/ && \ yum clean all && \ rm -rf /var/cache/yum && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ diff --git a/images/x86_64/centos/4.18/Dockerfile b/images/x86_64/centos/4.18/Dockerfile index 1e2223a..a0bd5ba 100644 --- a/images/x86_64/centos/4.18/Dockerfile +++ b/images/x86_64/centos/4.18/Dockerfile @@ -2,6 +2,7 @@ FROM quay.io/centos/centos:stream8 ARG VERSION=4.18.0-552 ARG BASEOS_URL='https://vault.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -14,7 +15,6 @@ RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo; \ RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y --allowerasing \ clang \ - cmake \ curl \ git \ iproute \ @@ -27,6 +27,10 @@ RUN dnf groupinstall -y 'Development Tools' && \ curl -Lo bpftool.rpm ${BASEOS_URL}/bpftool-${VERSION}.el8.x86_64.rpm && \ dnf install -y ./*.rpm && \ rm -v ./*.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.el8.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.el8.x86_64/ /lib/modules/${VERSION}.el8.x86_64/build && \ dnf clean all && \ diff --git a/images/x86_64/centos/5.14/Dockerfile b/images/x86_64/centos/5.14/Dockerfile index a6a8ba7..0050f51 100644 --- a/images/x86_64/centos/5.14/Dockerfile +++ b/images/x86_64/centos/5.14/Dockerfile @@ -2,6 +2,7 @@ FROM quay.io/centos/centos:stream9 ARG VERSION=5.14.0-648 ARG APPSTR_URL='http://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -9,7 +10,6 @@ SHELL ["/bin/bash", "-euo", "pipefail", "-c"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y --allowerasing \ clang \ - cmake \ curl \ git \ iproute \ @@ -21,6 +21,10 @@ RUN dnf groupinstall -y 'Development Tools' && \ curl -Lo headers.rpm ${APPSTR_URL}/kernel-devel-${VERSION}.el9.x86_64.rpm && \ dnf install -y ./*.rpm && \ rm -v ./*.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.el9.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.el9.x86_64/ /lib/modules/${VERSION}.el9.x86_64/build && \ dnf clean all && \ diff --git a/images/x86_64/fedora/5.17/Dockerfile b/images/x86_64/fedora/5.17/Dockerfile index 0c387cc..48c11ca 100644 --- a/images/x86_64/fedora/5.17/Dockerfile +++ b/images/x86_64/fedora/5.17/Dockerfile @@ -3,6 +3,7 @@ FROM fedora:36 ARG VERSION=5.17.5-300 ARG HVERSION=5.17.0-300 ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/36/Everything/x86_64/os/Packages' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -10,7 +11,6 @@ SHELL ["/bin/bash", "-euo", "pipefail", "-c"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ clang \ - cmake \ iproute \ libcap-devel \ llvm \ @@ -23,6 +23,10 @@ RUN dnf groupinstall -y 'Development Tools' && \ rm -v ./*.rpm && \ dnf clean all && \ rm -rf /var/cache/yum && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.fc36.x86_64 && \ ln -s /usr/src/kernels/${VERSION}.fc36.x86_64/ /lib/modules/${VERSION}.fc36.x86_64/build && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ diff --git a/images/x86_64/fedora/5.8/Dockerfile b/images/x86_64/fedora/5.8/Dockerfile index 56b5e1e..6245f89 100644 --- a/images/x86_64/fedora/5.8/Dockerfile +++ b/images/x86_64/fedora/5.8/Dockerfile @@ -3,6 +3,7 @@ FROM fedora:33 ARG VERSION=5.8.15-301 ARG HVERSION=5.8.11-300 ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/33/Everything/x86_64/os/Packages' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -10,7 +11,6 @@ SHELL ["/bin/bash", "-euo", "pipefail", "-c"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ clang \ - cmake \ iproute \ libcap-devel \ llvm \ @@ -23,6 +23,10 @@ RUN dnf groupinstall -y 'Development Tools' && \ rm -v ./*.rpm && \ dnf clean all && \ rm -rf /var/cache/yum && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.fc33.x86_64 && \ ln -s /usr/src/kernels/${VERSION}.fc33.x86_64/ /lib/modules/${VERSION}.fc33.x86_64/build && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ diff --git a/images/x86_64/fedora/6.2/Dockerfile b/images/x86_64/fedora/6.2/Dockerfile index b332294..172dbc8 100644 --- a/images/x86_64/fedora/6.2/Dockerfile +++ b/images/x86_64/fedora/6.2/Dockerfile @@ -3,6 +3,7 @@ FROM fedora:38 ARG VERSION=6.2.9-300 ARG HVERSION=6.2.6-300 ARG URL='https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/38/Everything/x86_64/os/Packages' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -10,7 +11,6 @@ SHELL ["/bin/bash", "-euo", "pipefail", "-c"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ clang \ - cmake \ iproute \ libcap-devel \ llvm \ @@ -23,6 +23,10 @@ RUN dnf groupinstall -y 'Development Tools' && \ rm -v ./*.rpm && \ dnf clean all && \ rm -rf /var/cache/yum && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ mkdir -p /lib/modules/${VERSION}.fc38.x86_64 && \ ln -s /usr/src/kernels/${VERSION}.fc38.x86_64/ /lib/modules/${VERSION}.fc38.x86_64/build && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ diff --git a/images/x86_64/oraclelinux/3.10/Dockerfile b/images/x86_64/oraclelinux/3.10/Dockerfile index 22bd41f..870d665 100644 --- a/images/x86_64/oraclelinux/3.10/Dockerfile +++ b/images/x86_64/oraclelinux/3.10/Dockerfile @@ -2,6 +2,7 @@ FROM oraclelinux:7 ARG VERSION=3.10.0-1160.92.1.0.2 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL7/MODRHCK/x86_64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -24,14 +25,13 @@ RUN yum install -y \ curl -Lo devel.rpm ${URL}/getPackage/kernel-devel-${VERSION}.el7.x86_64.rpm && \ yum install -y ./*.rpm && \ rm -f ./*.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ - curl -LO https://cmake.org/files/v3.16/cmake-3.16.7-Linux-x86_64.tar.gz && \ - tar -xaf cmake-3.16.7-Linux-x86_64.tar.gz && \ - rm -vf cmake-3.16.7-Linux-x86_64.tar.gz && \ - mv cmake-3.16.7-Linux-x86_64 /opt/cmake-3.16.7 && \ - ln -sf /opt/cmake-3.16.7/bin/* /usr/bin/ && \ mkdir -p /lib/modules/${VERSION}.el7.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.el7.x86_64/ /lib/modules/${VERSION}.el7.x86_64/build && \ yum install -y oracle-softwarecollection-release-el7 && \ diff --git a/images/x86_64/oraclelinux/4.14/Dockerfile b/images/x86_64/oraclelinux/4.14/Dockerfile index 10b2dcd..93188ab 100644 --- a/images/x86_64/oraclelinux/4.14/Dockerfile +++ b/images/x86_64/oraclelinux/4.14/Dockerfile @@ -2,6 +2,7 @@ FROM oraclelinux:7 ARG VERSION=4.14.35-2047.526.2 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -28,14 +29,13 @@ RUN yum groupinstall -y 'Development Tools' && \ curl -Lo libdtrace.rpm ${URL}/getPackage/libdtrace-ctf-1.1.0-2.el7.x86_64.rpm && \ yum install -y --skip-broken ./*.rpm && \ rm -vf ./*.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ - curl -LO https://cmake.org/files/v3.16/cmake-3.16.7-Linux-x86_64.tar.gz && \ - tar -xaf cmake-3.16.7-Linux-x86_64.tar.gz && \ - rm -vf cmake-3.16.7-Linux-x86_64.tar.gz && \ - mv cmake-3.16.7-Linux-x86_64 /opt/cmake-3.16.7 && \ - ln -sf /opt/cmake-3.16.7/bin/* /usr/bin/ && \ mkdir -p /lib/modules/${VERSION}.el7uek.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.el7uek.x86_64/ /lib/modules/${VERSION}.el7uek.x86_64/build && \ yum install -y oracle-softwarecollection-release-el7 && \ diff --git a/images/x86_64/oraclelinux/5.15/Dockerfile b/images/x86_64/oraclelinux/5.15/Dockerfile index eef833c..629dee6 100644 --- a/images/x86_64/oraclelinux/5.15/Dockerfile +++ b/images/x86_64/oraclelinux/5.15/Dockerfile @@ -2,6 +2,7 @@ FROM oraclelinux:9 ARG VERSION=5.15.0-8.91.4.1 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL9/UEKR7/x86_64' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -25,14 +26,13 @@ RUN yum install -y \ curl -Lo modules.rpm ${URL}/getPackage/kernel-uek-modules-${VERSION}.el9uek.x86_64.rpm && \ yum install -y ./*.rpm && \ rm -f ./*.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ - curl -LO https://cmake.org/files/v3.16/cmake-3.16.7-Linux-x86_64.tar.gz && \ - tar -xaf cmake-3.16.7-Linux-x86_64.tar.gz && \ - rm -vf cmake-3.16.7-Linux-x86_64.tar.gz && \ - mv cmake-3.16.7-Linux-x86_64 /opt/cmake-3.16.7 && \ - ln -sf /opt/cmake-3.16.7/bin/* /usr/bin/ && \ mkdir -p /lib/modules/${VERSION}.el9uek.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.el9uek.x86_64/ /lib/modules/${VERSION}.el9uek.x86_64/build && \ yum clean all && \ diff --git a/images/x86_64/oraclelinux/5.4/Dockerfile b/images/x86_64/oraclelinux/5.4/Dockerfile index 18eab9f..8d8c743 100644 --- a/images/x86_64/oraclelinux/5.4/Dockerfile +++ b/images/x86_64/oraclelinux/5.4/Dockerfile @@ -2,6 +2,7 @@ FROM oraclelinux:8 ARG VERSION=5.4.17-2136.320.7.1 ARG URL='https://yum.oracle.com/repo/OracleLinux/OL8/UEKR6/x86_64/' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -24,14 +25,13 @@ RUN yum install -y \ curl -Lo devel.rpm ${URL}/getPackage/kernel-uek-devel-${VERSION}.el8uek.x86_64.rpm && \ yum install -y ./*.rpm && \ rm -vf ./*.rpm && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ echo "root:root" | chpasswd && \ - curl -LO https://cmake.org/files/v3.16/cmake-3.16.7-Linux-x86_64.tar.gz && \ - tar -xaf cmake-3.16.7-Linux-x86_64.tar.gz && \ - rm -vf cmake-3.16.7-Linux-x86_64.tar.gz && \ - mv cmake-3.16.7-Linux-x86_64 /opt/cmake-3.16.7 && \ - ln -sf /opt/cmake-3.16.7/bin/* /usr/bin/ && \ mkdir -p /lib/modules/${VERSION}.el8uek.x86_64/ && \ ln -s /usr/src/kernels/${VERSION}.el8uek.x86_64/ /lib/modules/${VERSION}.el8uek.x86_64/build && \ yum clean all && \ diff --git a/images/x86_64/ubuntu/4.15/Dockerfile b/images/x86_64/ubuntu/4.15/Dockerfile index 7c9c4ab..c1c682b 100644 --- a/images/x86_64/ubuntu/4.15/Dockerfile +++ b/images/x86_64/ubuntu/4.15/Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:18.04 ARG VERSION=4.15.0-1118-aws ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws/' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -37,12 +38,11 @@ RUN apt-get update && apt-get install -y \ xargs -I@ curl -LO ${URL}@ && \ find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \ rm -f *.deb && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ echo "" > /etc/machine-id && echo "" > /var/lib/dbus/machine-id && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ - echo "root:root" | chpasswd && \ - curl -LO https://cmake.org/files/v3.16/cmake-3.16.7-Linux-x86_64.tar.gz && \ - tar -xaf cmake-3.16.7-Linux-x86_64.tar.gz && \ - rm -vf cmake-3.16.7-Linux-x86_64.tar.gz && \ - mv cmake-3.16.7-Linux-x86_64 /opt/cmake-3.16.7 && \ - ln -sf /opt/cmake-3.16.7/bin/* /usr/bin/ + echo "root:root" | chpasswd \ diff --git a/images/x86_64/ubuntu/5.8/Dockerfile b/images/x86_64/ubuntu/5.8/Dockerfile index 31d43cd..e97ff7e 100644 --- a/images/x86_64/ubuntu/5.8/Dockerfile +++ b/images/x86_64/ubuntu/5.8/Dockerfile @@ -1,6 +1,7 @@ FROM ubuntu:20.04 ARG VERSION=5.8.0-1041-aws +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -10,7 +11,6 @@ WORKDIR /home/ubuntu RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential \ clang-7 \ - cmake \ curl \ dbus \ git \ @@ -32,6 +32,10 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ wget && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ echo "" > /etc/machine-id && echo "" > /var/lib/dbus/machine-id && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ diff --git a/images/x86_64/ubuntu/6.2/Dockerfile b/images/x86_64/ubuntu/6.2/Dockerfile index 3f48cc4..66e6bbb 100644 --- a/images/x86_64/ubuntu/6.2/Dockerfile +++ b/images/x86_64/ubuntu/6.2/Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:22.04 ARG VERSION=6.2.0-1018-aws ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws-6.2/' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -11,7 +12,6 @@ WORKDIR /home/ubuntu RUN apt-get update && apt-get install -y \ build-essential \ clang \ - cmake \ curl \ dbus \ git \ @@ -36,6 +36,10 @@ RUN apt-get update && apt-get install -y \ xargs -I@ curl -LO ${URL}@ && \ find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \ rm -f *.deb && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ echo "" > /etc/machine-id && echo "" > /var/lib/dbus/machine-id && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \ diff --git a/images/x86_64/ubuntu/6.5/Dockerfile b/images/x86_64/ubuntu/6.5/Dockerfile index c4893a1..55cf186 100644 --- a/images/x86_64/ubuntu/6.5/Dockerfile +++ b/images/x86_64/ubuntu/6.5/Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:22.04 ARG VERSION=6.5.0-1024-aws ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws-6.5/' +ARG CMAKE_VERSION # Use bash for all RUN steps with some safety options enabled. SHELL ["/bin/bash", "-euo", "pipefail", "-c"] @@ -11,7 +12,6 @@ WORKDIR /home/ubuntu RUN apt-get update && apt-get install -y \ build-essential \ clang \ - cmake \ curl \ dbus \ git \ @@ -37,6 +37,10 @@ RUN apt-get update && apt-get install -y \ xargs -I@ curl -LO ${URL}@ && \ find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \ rm -f *.deb && \ + CMAKE_ARCH="x86_64" && \ + CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \ + curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \ + tar -C /usr --strip-components 1 "${CMAKE_RELEASE_NAME}/bin" "${CMAKE_RELEASE_NAME}/share" -xzpvf - && \ echo "" > /etc/machine-id && echo "" > /var/lib/dbus/machine-id && \ sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \ echo 'UseDNS no' >> /etc/ssh/sshd_config && \