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 757ac30..9bb520b 100644 --- a/images/aarch64/amazonlinux2/5.4/Dockerfile +++ b/images/aarch64/amazonlinux2/5.4/Dockerfile @@ -2,6 +2,10 @@ 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"] RUN yum install -y \ binutils-devel \ @@ -29,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 2182368..2584425 100644 --- a/images/aarch64/amazonlinux2022/5.15/Dockerfile +++ b/images/aarch64/amazonlinux2022/5.15/Dockerfile @@ -2,14 +2,16 @@ 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"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ binutils-devel \ chrony \ clang \ - cmake \ iproute \ kmod \ libcap-devel \ @@ -28,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 2402d93..f688ea5 100644 --- a/images/aarch64/archlinux/4.14/Dockerfile +++ b/images/aarch64/archlinux/4.14/Dockerfile @@ -2,13 +2,16 @@ 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"] WORKDIR /home/ubuntu RUN pacman -Syyu --noconfirm && \ pacman -S --noconfirm \ clang \ - cmake \ gcc \ git \ libcap \ @@ -19,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 && \ @@ -32,4 +39,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 8b68e2c..d1d7ece 100644 --- a/images/aarch64/fedora/6.2/Dockerfile +++ b/images/aarch64/fedora/6.2/Dockerfile @@ -3,12 +3,15 @@ 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' +ARG CMAKE_VERSION + +# 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 \ - cmake \ iproute \ libcap-devel \ llvm \ @@ -19,6 +22,11 @@ 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 && \ + 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/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 diff --git a/images/aarch64/oraclelinux/4.14/Dockerfile b/images/aarch64/oraclelinux/4.14/Dockerfile index 253eeb0..ee858c7 100644 --- a/images/aarch64/oraclelinux/4.14/Dockerfile +++ b/images/aarch64/oraclelinux/4.14/Dockerfile @@ -2,6 +2,10 @@ 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"] COPY /dev.repo /etc/yum.repos.d/ @@ -29,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 523e090..81fc911 100644 --- a/images/aarch64/oraclelinux/5.15/Dockerfile +++ b/images/aarch64/oraclelinux/5.15/Dockerfile @@ -3,6 +3,10 @@ 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"] RUN yum install -y \ binutils-devel \ @@ -25,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 c58ba9d..fe59fbb 100644 --- a/images/aarch64/ubuntu/6.5/Dockerfile +++ b/images/aarch64/ubuntu/6.5/Dockerfile @@ -1,15 +1,17 @@ -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/' +ARG CMAKE_VERSION + +# 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 \ build-essential \ clang \ - cmake \ - curl \ curl \ dbus \ git \ @@ -32,17 +34,14 @@ 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 && \ 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/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}@ && \ diff --git a/images/builder/Dockerfile b/images/builder/Dockerfile index 8c50060..0b3e425 100644 --- a/images/builder/Dockerfile +++ b/images/builder/Dockerfile @@ -2,6 +2,10 @@ 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"] COPY /dhclient.service /usr/lib/systemd/system/ @@ -21,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 \ @@ -37,16 +40,13 @@ RUN yum install -y \ systemd \ tar \ wget \ - sed && \ - yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ && \ - source /opt/rh/devtoolset-9/enable - -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 && \ + sed \ + devtoolset-9-gcc \ + devtoolset-9-gcc-c++ + +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 0dcaceb..fc456c5 100644 --- a/images/modernprobe-builder/Dockerfile +++ b/images/modernprobe-builder/Dockerfile @@ -1,5 +1,10 @@ FROM fedora:latest +ARG CMAKE_VERSION + +# 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 \ @@ -9,7 +14,6 @@ RUN dnf install -y \ bpftool \ ca-certificates \ clang \ - cmake \ dhclient \ gcc \ gcc-c++ \ @@ -23,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 58b49db..197e576 100644 --- a/images/x86_64/amazonlinux2/4.19/Dockerfile +++ b/images/x86_64/amazonlinux2/4.19/Dockerfile @@ -2,6 +2,10 @@ 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"] RUN yum install -y \ binutils-devel \ @@ -28,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 df18f97..04bfe2f 100644 --- a/images/x86_64/amazonlinux2/5.10/Dockerfile +++ b/images/x86_64/amazonlinux2/5.10/Dockerfile @@ -2,6 +2,10 @@ 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"] RUN yum install -y \ binutils-devel \ @@ -28,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 ea6b966..759dfa3 100644 --- a/images/x86_64/amazonlinux2/5.15/Dockerfile +++ b/images/x86_64/amazonlinux2/5.15/Dockerfile @@ -2,6 +2,10 @@ 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"] RUN yum install -y \ binutils-devel \ @@ -28,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 91bc9f9..7c560ad 100644 --- a/images/x86_64/amazonlinux2/5.4/Dockerfile +++ b/images/x86_64/amazonlinux2/5.4/Dockerfile @@ -2,6 +2,10 @@ 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"] RUN yum install -y \ binutils-devel \ @@ -28,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 64d44c5..c63e61b 100644 --- a/images/x86_64/amazonlinux2022/5.15/Dockerfile +++ b/images/x86_64/amazonlinux2022/5.15/Dockerfile @@ -2,13 +2,15 @@ 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"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ binutils-devel \ clang \ - cmake \ iproute \ kmod \ libcap-devel \ @@ -29,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 b429ed6..050b62e 100644 --- a/images/x86_64/amazonlinux2023/6.1/Dockerfile +++ b/images/x86_64/amazonlinux2023/6.1/Dockerfile @@ -2,13 +2,15 @@ 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"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ binutils-devel \ clang \ - cmake \ iproute \ kmod \ libcap-devel \ @@ -25,10 +27,14 @@ 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 && \ + 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 3bd9a57..8b0cd0f 100644 --- a/images/x86_64/archlinux/5.18/Dockerfile +++ b/images/x86_64/archlinux/5.18/Dockerfile @@ -1,12 +1,16 @@ 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"] + WORKDIR /home/ubuntu RUN printf 'SigLevel = Never\nServer=https://archive.archlinux.org/repos/2022/08/04/$repo/os/$arch' > /etc/pacman.d/mirrorlist && \ pacman -Syyu --noconfirm && \ pacman -S --noconfirm \ clang \ - cmake \ gcc \ git \ libcap \ @@ -17,7 +21,11 @@ pacman -Syyu --noconfirm && \ python \ rsync \ wget && \ - yes | pacman -Scc && \ + 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 6c3bfd3..c4232f1 100644 --- a/images/x86_64/archlinux/6.0/Dockerfile +++ b/images/x86_64/archlinux/6.0/Dockerfile @@ -1,12 +1,16 @@ 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"] + WORKDIR /home/ubuntu RUN printf 'SigLevel = Never\nServer=https://archive.archlinux.org/repos/2022/12/11/$repo/os/$arch' > /etc/pacman.d/mirrorlist && \ pacman -Syyu --noconfirm && \ pacman -S --noconfirm \ clang \ - cmake \ gcc \ git \ libcap \ @@ -17,7 +21,11 @@ pacman -Syyu --noconfirm && \ python \ rsync \ wget && \ - yes | pacman -Scc && \ + 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 49a3ff6..5d7b840 100644 --- a/images/x86_64/archlinux/6.7/Dockerfile +++ b/images/x86_64/archlinux/6.7/Dockerfile @@ -1,12 +1,16 @@ 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"] + WORKDIR /home/ubuntu RUN printf 'SigLevel = Never\nServer=https://archive.archlinux.org/repos/2024/01/24/$repo/os/$arch' > /etc/pacman.d/mirrorlist && \ pacman -Syyu --noconfirm && \ pacman -S --noconfirm \ clang \ - cmake \ gcc \ git \ libcap \ @@ -17,7 +21,11 @@ pacman -Syyu --noconfirm && \ python \ rsync \ wget && \ - yes | pacman -Scc && \ + 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 bf26cce..e70972c 100644 --- a/images/x86_64/centos/3.10/Dockerfile +++ b/images/x86_64/centos/3.10/Dockerfile @@ -1,11 +1,19 @@ 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' +ARG CMAKE_VERSION + +# 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; \ + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo RUN yum group install -y "Development Tools" && \ yum install -y \ - cmake \ curl \ gcc \ git \ @@ -20,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/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 && \ diff --git a/images/x86_64/centos/4.18/Dockerfile b/images/x86_64/centos/4.18/Dockerfile index 4ee9eb0..a0bd5ba 100644 --- a/images/x86_64/centos/4.18/Dockerfile +++ b/images/x86_64/centos/4.18/Dockerfile @@ -1,12 +1,20 @@ 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' +ARG CMAKE_VERSION + +# 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; \ + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y --allowerasing \ clang \ - cmake \ curl \ git \ iproute \ @@ -19,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/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' && \ diff --git a/images/x86_64/centos/5.14/Dockerfile b/images/x86_64/centos/5.14/Dockerfile index 8b0aed1..0050f51 100644 --- a/images/x86_64/centos/5.14/Dockerfile +++ b/images/x86_64/centos/5.14/Dockerfile @@ -1,12 +1,15 @@ 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' +ARG CMAKE_VERSION + +# 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 \ - cmake \ curl \ git \ iproute \ @@ -18,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/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 diff --git a/images/x86_64/fedora/5.17/Dockerfile b/images/x86_64/fedora/5.17/Dockerfile index 6b677f1..48c11ca 100644 --- a/images/x86_64/fedora/5.17/Dockerfile +++ b/images/x86_64/fedora/5.17/Dockerfile @@ -3,11 +3,14 @@ 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"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ clang \ - cmake \ iproute \ libcap-devel \ llvm \ @@ -20,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 5149c7a..6245f89 100644 --- a/images/x86_64/fedora/5.8/Dockerfile +++ b/images/x86_64/fedora/5.8/Dockerfile @@ -3,11 +3,14 @@ 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"] RUN dnf groupinstall -y 'Development Tools' && \ dnf install -y \ clang \ - cmake \ iproute \ libcap-devel \ llvm \ @@ -20,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 ebff9f2..172dbc8 100644 --- a/images/x86_64/fedora/6.2/Dockerfile +++ b/images/x86_64/fedora/6.2/Dockerfile @@ -2,12 +2,15 @@ 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' +ARG CMAKE_VERSION + +# 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 \ - cmake \ iproute \ libcap-devel \ llvm \ @@ -20,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/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 diff --git a/images/x86_64/oraclelinux/3.10/Dockerfile b/images/x86_64/oraclelinux/3.10/Dockerfile index c0b6eb3..870d665 100644 --- a/images/x86_64/oraclelinux/3.10/Dockerfile +++ b/images/x86_64/oraclelinux/3.10/Dockerfile @@ -2,6 +2,10 @@ 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"] COPY /dev.repo /etc/yum.repos.d/ @@ -21,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 a4c1fd6..93188ab 100644 --- a/images/x86_64/oraclelinux/4.14/Dockerfile +++ b/images/x86_64/oraclelinux/4.14/Dockerfile @@ -2,6 +2,10 @@ 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"] COPY /dev.repo /etc/yum.repos.d/ @@ -25,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 f789e6d..629dee6 100644 --- a/images/x86_64/oraclelinux/5.15/Dockerfile +++ b/images/x86_64/oraclelinux/5.15/Dockerfile @@ -2,6 +2,10 @@ 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"] RUN yum install -y \ binutils-devel \ @@ -22,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 59d7964..8d8c743 100644 --- a/images/x86_64/oraclelinux/5.4/Dockerfile +++ b/images/x86_64/oraclelinux/5.4/Dockerfile @@ -2,6 +2,10 @@ 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"] RUN yum install -y \ binutils-devel \ @@ -21,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 58fcc3b..c1c682b 100644 --- a/images/x86_64/ubuntu/4.15/Dockerfile +++ b/images/x86_64/ubuntu/4.15/Dockerfile @@ -1,7 +1,11 @@ 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/' +ARG CMAKE_VERSION + +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] WORKDIR /home/ubuntu @@ -30,16 +34,15 @@ 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 && \ + 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/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 diff --git a/images/x86_64/ubuntu/5.8/Dockerfile b/images/x86_64/ubuntu/5.8/Dockerfile index 025ea25..e97ff7e 100644 --- a/images/x86_64/ubuntu/5.8/Dockerfile +++ b/images/x86_64/ubuntu/5.8/Dockerfile @@ -1,13 +1,16 @@ 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"] WORKDIR /home/ubuntu RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential \ clang-7 \ - cmake \ curl \ dbus \ git \ @@ -29,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 b0cdc2c..66e6bbb 100644 --- a/images/x86_64/ubuntu/6.2/Dockerfile +++ b/images/x86_64/ubuntu/6.2/Dockerfile @@ -1,14 +1,17 @@ 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/' +ARG CMAKE_VERSION + +# Use bash for all RUN steps with some safety options enabled. +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] 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 \ curl \ dbus \ git \ @@ -17,8 +20,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 +30,16 @@ 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 && \ + 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.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 | \ diff --git a/images/x86_64/ubuntu/6.5/Dockerfile b/images/x86_64/ubuntu/6.5/Dockerfile index aca6987..55cf186 100644 --- a/images/x86_64/ubuntu/6.5/Dockerfile +++ b/images/x86_64/ubuntu/6.5/Dockerfile @@ -1,14 +1,17 @@ -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/' +ARG CMAKE_VERSION + +# 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 \ build-essential \ clang \ - cmake \ curl \ dbus \ git \ @@ -30,10 +33,14 @@ 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 && \ + 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.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 | \