From 511933d91adb12158bb2a607432ceb06df800cab Mon Sep 17 00:00:00 2001 From: arewm Date: Mon, 6 Jan 2025 13:45:50 -0500 Subject: [PATCH] Update containerfiles * Changing parent image from Fedora to CentOS Stream to get a newer golang and unshare version before it is available in UBI * Updating labels on images to be more accurate Signed-off-by: arewm --- Containerfile.buildah | 25 ++++++++++++++++++++++++- Containerfile.task | 16 +++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Containerfile.buildah b/Containerfile.buildah index 7b39461..4ac90a9 100644 --- a/Containerfile.buildah +++ b/Containerfile.buildah @@ -1,5 +1,28 @@ # Source from buildah/contrib/docker/Dockerfile -FROM Fedora +FROM quay.io/centos/centos:stream10-minimal + +# Ensure that labels are overwritten from parent image while also setting relevant new labels. +# This includes overwriting the relevant org.label-schema labels used by centos stream as well as +# creating new labels according to the image-spec: https://github.com/opencontainers/image-spec/blob/main/annotations.md +LABEL \ + org.label-schema.schema-version="1.0" \ + org.label-schema.vendor="Konflux CI" \ + org.opencontainers.image.vendor="Konflux CI" \ + org.opencontainers.image.url="https://quay.io/konflux-ci/buildah" \ + org.opencontainers.image.url="https://quay.io/konflux-ci/buildah" \ + org.opencontainers.image.source="https://github.com/konflux-ci/buildah-container" \ + org.label-schema.name="buildah" \ + org.opencontainers.image.title="buildah" \ + name="konflux-buildah" \ + com.redhat.component="konflux-buildah" \ + io.k8s.display-name="konflux-buildah" \ + io.openshift.tags="buildah" \ + summary="Command line tool to create and work with containers." \ + description="Command line tool to create and work with containers. This is a repackaged version for use within Konflux CI." \ + io.k8s.description="Command line tool to create and work with containers. This is a repackaged version for use within Konflux CI." \ + org.opencontainers.image.documentation="https://github.com/containers/image_build/blob/main/buildah/README.md" + + RUN dnf -y update && dnf -y clean all RUN dnf -y install btrfs-progs-devel containers-common golang go-md2man gpgme-devel libassuan-devel libseccomp-devel make net-tools runc shadow-utils glibc-static libselinux-static libseccomp-static && dnf -y clean all COPY . /go/src/github.com/containers/buildah diff --git a/Containerfile.task b/Containerfile.task index 351138a..2d9dfb6 100644 --- a/Containerfile.task +++ b/Containerfile.task @@ -5,7 +5,7 @@ # for our tasks that has more than _just_ buildah in it. We also need to add the required functionality # for the remote builds. -FROM registry.fedoraproject.org/fedora-minimal:40 AS dockerfile-json-builder +FROM quay.io/centos/centos:stream10-minimal AS dockerfile-json-builder ARG BUILDER_RPMS="golang" RUN microdnf install -y $BUILDER_RPMS @@ -19,6 +19,20 @@ RUN go build -o dockerfile-json FROM quay.io/redhat-user-workloads/rhtap-build-tenant/buildah-container/buildah@sha256:391ce6bd8652a81d1237d4aec46acabec0a6b61f9a7ea94a16ffa1a40d759378 +LABEL \ + org.opencontainers.image.url="https://quay.io/konflux-ci/buildah-task" \ + org.opencontainers.image.url="https://quay.io/konflux-ci/buildah-task" \ + org.label-schema.name="buildah-task" \ + org.opencontainers.image.title="buildah-task" \ + name="konflux-buildah-task" \ + com.redhat.component="konflux-buildah-task" \ + io.k8s.display-name="konflux-buildah-task" \ + io.openshift.tags="buildah tekton" \ + summary="Command line tool to create and work with containers within Tekton tasks." \ + description="Command line tool to create and work with containers. This is a repackaged version for use within Tekton tasks in Konflux CI. It includes additional functionality on top of buildah that might be required for the tasks." \ + io.k8s.description="Command line tool to create and work with containers. This is a repackaged version for use within Tekton tasks in Konflux CI. It includes additional functionality on top of buildah that might be required for the tasks." \ + org.opencontainers.image.documentation="https://github.com/containers/image_build/blob/main/buildah/README.md" + ARG INSTALL_RPMS="rsync openssh-clients kubernetes-client jq iproute subscription-manager" RUN microdnf install -y $INSTALL_RPMS && \ microdnf -y clean all && \