[Debian-salsa-ci] Bug#1076529: golang-github-containers-image-dev: buildah is unable to push non-default platform images
Santiago Ruano Rincón
santiagorr at riseup.net
Wed Jul 17 22:27:29 BST 2024
Package: golang-github-containers-image-dev
Version: 5.29.4-1
Severity: normal
Tags: upstream
Forwarded: https://github.com/containers/image/issues/2484
X-Debbugs-Cc: santiagorr at riseup.net, debian-salsa-ci at alioth-lists.debian.net
Dear Maintainer,
If a build an image for a non-default platform, e.g. i386 on amd64,
armhf or armel on arm64, wihtout building the image for the default
platform, buildah is not able to push it. It complains because it
doesn't find the default platform-image:
buildah push build-essential <registry>
Error: pushing image "build-essential" to "<registry>": no image found in image index for architecture amd64, variant "", OS linux: image not known
I found this issue when trying to switch the Salsa CI's building tools
from kaniko to buildah. I can reproduce it locally, with a simple
Dockerfile:
FROM debian:unstable
ARG ARCH=amd64
RUN apt-get update
RUN apt-get -y install build-essential
and building it with:
buildah build --build-arg ARCH=i386 --platform "linux/i386" --manifest build-essential
This is the related manifest:
podman manifest inspect build-essential
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 760,
"digest": "sha256:9e1d8cef9e7c0d284fc2955e6c73c5994d2066b241db8f9e6c0f4e6c61cae7df",
"platform": {
"architecture": "386",
"os": "linux"
}
}
]
}
The error is produce by chooseInstance():
https://sources.debian.org/src/golang-github-containers-image/5.29.4-1/internal/manifest/oci_index.go/?hl=260#L260
buildah successfully pushes the image if I additionally build the
default-platform image, but I really would like to avoid having
multi-arch images.
Cheers,
-- Santiago
-- System Information:
Debian Release: trixie/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-21-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_DIE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE, TAINT_LIVEPATCH
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages golang-github-containers-image-dev depends on:
ii golang-github-acarl005-stripansi-dev 0.0~git20180116.5a71ef0-3
ii golang-github-burntsushi-toml-dev 1.3.2-2
ii golang-github-containers-libtrust-dev 0.0~git20230121.c1716e8-2
ii golang-github-containers-ocicrypt-dev 1.1.10-2
ii golang-github-containers-storage-dev 1.51.0+ds1-2
ii golang-github-coreos-bbolt-dev 1.3.8-1
ii golang-github-docker-distribution-dev 2.8.2+ds1-1
ii golang-github-docker-docker-credential-helpers 0.6.4+ds1-1
-dev
ii golang-github-docker-docker-dev 20.10.25+dfsg1-3
ii golang-github-docker-go-connections-dev 0.4.0-4
ii golang-github-ghodss-yaml-dev 1.0.0+git20220118.d8423dc-2
ii golang-github-imdario-mergo-dev 0.3.16-2
ii golang-github-klauspost-pgzip-dev 1.2.6-1
ii golang-github-manifoldco-promptui-dev 0.9.0-1
ii golang-github-mattn-go-sqlite3-dev 1.14.19~ds1-1
ii golang-github-moby-sys-dev 0.0~git20231105.a4e0878-1
ii golang-github-opencontainers-go-digest-dev 1.0.0-2
ii golang-github-opencontainers-image-spec-dev 1.1.0-2
ii golang-github-opencontainers-selinux-dev 1.11.0+ds1-2
ii golang-github-ostreedev-ostree-go-dev 0.0+git20190702.759a8c1-5
ii golang-github-pkg-errors-dev 0.9.1-3
ii golang-github-proglottis-gpgme-dev 0.1.1-2
ii golang-github-secure-systems-lab-go-securesyst 0.8.0-2
emslib-dev
ii golang-github-sigstore-fulcio-dev 1.2.0-2
ii golang-github-sigstore-rekor-dev 1.3.5-2
ii golang-github-sigstore-sigstore-dev 1.8.6-1
ii golang-github-sirupsen-logrus-dev 1.9.0-1
ii golang-github-stretchr-testify-dev 1.9.0-1
ii golang-github-sylabs-sif-dev 2.17.0-1
ii golang-github-theupdateframework-go-tuf-dev 0.6.1-1
ii golang-github-ulikunitz-xz-dev 0.5.6-2
ii golang-github-vbatts-tar-split-dev 0.11.5-1
ii golang-github-vbauerster-mpb-dev 8.6.1-3
ii golang-github-xeipuuv-gojsonschema-dev 1.2.0-3
ii golang-golang-x-crypto-dev 1:0.23.0-1
ii golang-golang-x-exp-dev 0.0~git20231006.7918f67-1
ii golang-golang-x-net-dev 1:0.25.0+dfsg-1
ii golang-golang-x-sync-dev 0.7.0-1
ii golang-gopkg-cheggaaa-pb.v1-dev 1.0.25-3
golang-github-containers-image-dev recommends no packages.
golang-github-containers-image-dev suggests no packages.
Versions of buildah and podman:
ii buildah 1.33.7+ds1-1
ii podman 4.9.5+ds1-1
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-salsa-ci/attachments/20240717/6290bba9/attachment.sig>
More information about the Debian-salsa-ci
mailing list