buildah (1.38.0) bud --all-platforms --manifest - not resolving manifest specified in a build-arg (`FROM $BUILDARG`)
grooverdan opened this issue · 3 comments
grooverdan commented
The base manifest mariadb-5293-ubi
was created with buildah
(create
, add
).
The `buildah bud --all-platforms . --build-arg BASE=mariadb-52293-ubi Containerfile..
With a basic Containerfile beginning:
ARG BASE
FROM $BASE
Fails to resolve the base manifest. With and without and explicit localhost/
prefix.
$ buildah manifest inspect mariadb-52293-ubi
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 2668,
"digest": "sha256:3dcb8be60079a6f7bdaa888ac4236ea132f1e255945af8446b4b6acbf1b20f73",
"platform": {
"architecture": "amd64",
"os": "linux"
}
}
]
}
$ podman run --rm mariadb-52293-ubi echo "Help"
Help
$ buildah bud --all-platforms --jobs 4 --manifest mariadb-52293-ubi-debug --build-arg BASE=mariadb-52293-ubi -f mariadb-docker/Containerfile.debug-ubi
? Please select an image:
▸ registry.fedoraproject.org/mariadb-52293-ubi:latest
registry.access.redhat.com/mariadb-52293-ubi:latest
docker.io/library/mariadb-52293-ubi:latest
The $BASE
as an argument didn't resolve to the manifest despite the manifest existing per previous buildah
and podman
command.
Pushing this manifest to a full tag didn't resolve this either
$ buildah tag mariadb-52293-ubi domain.with.name/mariadb-52293-ubi:tag
$ podman run --rm domain.with.name/mariadb-52293-ubi:tag echo "Help"
Help
$ buildah bud --all-platforms --jobs 4 --manifest mariadb-52293-ubi-debug --build-arg BASE=domain.with.name/mariadb-52293-ubi:tag -f mariadb-docker/Containerfile.debug-ubi
Error: base image name "domain.with.name/mariadb-52293-ubi:tag" didn't resolve to a manifest list
(base)
$ buildah version
Version: 1.38.0
Go Version: go1.23.2
Image Spec: 1.1.0
Runtime Spec: 1.2.0
CNI Spec: 1.1.0
libcni Version:
image Version: 5.33.0
Git Commit:
Built: Wed Nov 13 03:29:52 2024
OS/Arch: linux/amd64
BuildPlatform: linux/amd64
$ buildah info
{
"host": {
"CgroupVersion": "v2",
"Distribution": {
"distribution": "fedora",
"version": "41"
},
grooverdan commented
Note explicit use of --platform
resolves this;
$ buildah bud --platform linux/amd64 --jobs 4 --manifest mariadb-52293-ubi-debug --build-arg BASE=domain.with.name/mariadb-52293-ubi:tag -f mariadb-docker/Containerfile.debug-ubi
STEP 1/4: FROM domain.with.name/mariadb-52293-ubi:tag
STEP 2/4: USER root
....
But not a short version:
buildah manifest inspect "$devmanifest" | tee "${t}"
+ buildah manifest inspect mariadb-52293-ubi
+ tee /tmp/tmp.fww4TiapX5
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 2668,
"digest": "sha256:b7e1e0a1fab554076472ec497115ade427bb01f1b6638ca02134a11a6e968e23",
"platform": {
"architecture": "amd64",
"os": "linux"
}
}
]
}
trap 'manifest_image_cleanup "$devmanifest" "$t"' EXIT
+ trap 'manifest_image_cleanup "$devmanifest" "$t"' EXIT
if [ "$prod_environment" = "True" ]; then
buildah manifest push --all "$devmanifest" "docker://quay.io/mariadb-foundation/mariadb-devel:${container_tag}"
echo "${container_tag}" > last_tag
else
rm -f last_tag
fi
+ '[' False = True ']'
+ rm -f last_tag
#
# MAKE Debug manifest
debugmanifest=${image}-debug
+ debugmanifest=mariadb-52293-ubi-debug
## intentionally array to simple
# shellcheck disable=SC2124
archlist="${arches[@]}"
+ archlist=linux/amd64
# comma separated
archlist=${archlist// /,}
+ archlist=linux/amd64
buildah bud --platform "${archlist}" --jobs 4 --manifest "$debugmanifest" --build-arg BASE="$image" -f "mariadb-docker/Containerfile.debug$ubi"
+ buildah bud --platform linux/amd64 --jobs 4 --manifest mariadb-52293-ubi-debug --build-arg BASE=mariadb-52293-ubi -f mariadb-docker/Containerfile.debug-ubi
STEP 1/4: FROM mariadb-52293-ubi
? Please select an image:
▸ registry.fedoraproject.org/mariadb-52293-ubi:latest
registry.access.redhat.com/mariadb-52293-ubi:latest
docker.io/library/mariadb-52293-ubi:latest
github-actions commented
A friendly reminder that this issue had no activity for 30 days.
grooverdan commented
Is something unclear?