Skip to content

Containerfile.openshell pins a single-arch arm64 base — amd64 builds fail; build and publish multi-arch images #131

Closed

Description

@pavelanni

Problem

Containerfile.openshell pins the base image by digest:

FROM registry.access.redhat.com/ubi10/ubi-minimal@sha256:602a6643e552ed429d7d64d3e409b3c4d0b42c1c8f965af9b44d4a3f842ad874

That digest is a single-arch manifest, not a multi-arch index:

mediaType: application/vnd.oci.image.manifest.v1+json   manifests: 0
podman image inspect <digest> → Architecture: arm64

So an amd64 build cannot work. Reproduced on an amd64 host (RHEL 10) building from
the pinned base:

STEP 4/9: RUN microdnf install -y tar && microdnf clean all
exec container process `/bin/sh`: Exec format error
Error: building at STEP "RUN microdnf install -y tar ...": exit status 1

make image-openshell OPENARCH=amd64 cross-compiles the Go binary correctly
(GOOS=linux GOARCH=amd64); only the base image is the blocker. This also
produced a mislabeled local image earlier — an -amd64 tag whose contents were
arm64 binaries, which fails at runtime on amd64 nodes with
failed to spawn sandbox entrypoint process 'sleep': Exec format error.

Proposal

  1. Do not pin a per-architecture digest. Use the multi-arch tag:

    FROM registry.access.redhat.com/ubi10/ubi-minimal:latest

    The tag is a multi-arch index (amd64, arm64, s390x, ppc64le), so
    podman build --platform linux/amd64 resolves the right manifest.

  2. If reproducibility is a hard requirement, pin the index digest instead of a
    per-arch one, and note in a comment how it was resolved
    (skopeo inspect --raw docker://…:latest must show
    application/vnd.oci.image.index.v1+json).

  3. Publish a multi-arch manifest for the -openshell image so one tag serves
    both hosts:

    podman manifest create $IMAGE
    podman build --platform linux/amd64 --manifest $IMAGE …
    podman build --platform linux/arm64 --manifest $IMAGE …
    podman manifest push --all $IMAGE

    This avoids separate -amd64/-arm64 tags drifting apart (one of which was
    already mislabeled).

Acceptance

  • make image-openshell OPENARCH=amd64 succeeds on an amd64 host and
    OPENARCH=arm64 succeeds on arm64.
  • podman manifest inspect <published image> lists both architectures.
  • The amd64 image runs on an amd64 Kubernetes node (/bin/sh, sleep,
    /etc/os-release all execute).
  • Containerfile (the non-OpenShell image) already uses a :latest base, so the
    two files stay consistent.

Notes

Useful during the investigation: OpenShell's Kubernetes driver pulls sandbox
images with if_not_present, so an image rebuilt under the same tag is not
re-pulled on a node with the old copy — publish unique tags (or digests) and let
consumers pin them.

/cc @Panni

Activity

  1. pavelanni commented on Nov 16, 2026

    @pavelanni
    CollaboratorAuthor

    Reopening: the auto-close came from Closes #131 in the first commit message of #132 (squashed into the merge message), not from the PR body, which was Part of #131.

    The multi-arch manifest is configured in .goreleaser.yaml (builds -openshell-amd64 + -openshell-arm64, merges them into :<version>-openshell, from #113), but the image has not been published yet. Close this once the first tagged release publishes the manifest and T7 (podman manifest inspect ghcr.io/redhat-et/docsclaw:<ver>-openshell) shows amd64 + arm64.

  2. pavelanni commented on Nov 16, 2026

    @pavelanni
    CollaboratorAuthor

    Published and verified: ghcr.io/redhat-et/docsclaw:0.21.0-rc.1-openshell is an OCI image index listing linux/amd64 and linux/arm64 (checked with skopeo inspect --raw), and both per-arch tags exist. The amd64 image builds natively on rhel01 and runs docsclaw version 0.21.0-rc.1; T2 and T3.3 scenario 1 passed on x86_64 (PR #134 records the results).

    Remaining item, tracked in the T5 section of the release test plan rather than here: create an OpenShell sandbox from the amd64 image on an amd64 Kubernetes node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions