Skip to content

Commit

Permalink
Update containerfiles
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
arewm committed Jan 6, 2025
1 parent 55db80d commit 6ff1502
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
24 changes: 23 additions & 1 deletion Containerfile.buildah
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# 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.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
Expand Down
15 changes: 14 additions & 1 deletion Containerfile.task
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -19,6 +19,19 @@ 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.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 && \
Expand Down

0 comments on commit 6ff1502

Please sign in to comment.