-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building multi-arch with podman appears to result in a pushed image with only one arch #13676
Comments
Hi @nycnewman , Thanks for creating the issue. I think Could you try this Then try Overall this seems to be an issue with |
@nycnewman I am closing this issue since you need to push manifest and works fine with @ashley-cui @baude Could you try this on |
Looks like Github swallowed some of the command lines. I tried the following: podman build --log-level debug --platform linux/arm64/v8 --platform linux/amd64 --manifest docker.io/nycnewman/web-frontend:0.3 . podman manifest push docker.io/nycnewman/web-frontend:0.3 docker://docker.io/nycnewman/web-frontend:0.3 podman push docker.io/nycnewman/web-frontend:0.3 docker://docker.io/nycnewman/web-frontend:0.3 As far as I can see this produced: podman images which suggests four untagged images (assumption being that since Dockerfile has a two step then this is one image per step for two platforms). The manifect push returned almost immediately with no upload to Docker Hub and the image push only pushed the linux/arm64/v8 image. @flouthoc I don't have rights to reopen. |
A friendly reminder that this issue had no activity for 30 days. |
@flouthoc @nycnewman Do we have a repeater of this without github being involved. |
@flouthoc could you try a manifest build and push using podman-remote and see if it has issues? |
A friendly reminder that this issue had no activity for 30 days. |
Will check this today. |
Hi @nycnewman , I tried replaying this again. In example above #13676 (comment) your second push override the first You can see my steps below
sudo podman-remote build --log-level debug --platform linux/arm64/v8 --platform linux/amd64 --manifest quay.io/myuser/test .
INFO[0000] podman-remote filtering at log level debug
DEBU[0000] Called build.PersistentPreRunE(podman-remote build --log-level debug --platform linux/arm64/v8 --platform linux/amd64 --manifest quay.io/myuser/test .)
DEBU[0000] DoRequest Method: GET URI: http://d/v4.2.0/libpod/_ping
DEBU[0000] Loading registries configuration "/etc/containers/registries.conf"
DEBU[0000] Loading registries configuration "/etc/containers/registries.conf.d/000-shortnames.conf"
DEBU[0000] Found credentials for quay.io in credential helper containers-auth.json in file /run/containers/0/auth.json
DEBU[0000] DoRequest Method: POST URI: http://d/v4.2.0/libpod/build
[linux/amd64] STEP 1/2: FROM alpine
Resolved "alpine" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/alpine:latest...
Getting image source signatures
Copying blob sha256:2408cc74d12b6cd092bb8b516ba7d5e290f485d3eb9672efc00f0583730179e8
Copying blob sha256:2408cc74d12b6cd092bb8b516ba7d5e290f485d3eb9672efc00f0583730179e8
Copying config sha256:e66264b98777e12192600bf9b4d663655c98a090072e1bab49e233d7531d1294
Writing manifest to image destination
Storing signatures
[linux/amd64] STEP 2/2: COPY hello .
[linux/amd64] COMMIT
--> b7c96a30183
[linux/arm64] STEP 1/2: FROM alpine
[Warning] one or more build args were not consumed: [TARGETARCH TARGETOS TARGETPLATFORM]
b7c96a3018383649dc1282e45d5f96413ff7479d6e5bfe58b71c5d9291c84909
Resolved "alpine" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/alpine:latest...
Getting image source signatures
Copying blob sha256:b3c136eddcbf2003d3180787cef00f39d46b9fd9e4623178282ad6a8d63ad3b0
Copying blob sha256:b3c136eddcbf2003d3180787cef00f39d46b9fd9e4623178282ad6a8d63ad3b0
Copying config sha256:6e30ab57aeeef1ebca8ac5a6ea05b5dd39d54990be94e7be18bb969a02d10a3f
Writing manifest to image destination
Storing signatures
[linux/arm64] STEP 2/2: COPY hello .
[linux/arm64] COMMIT
--> 86093f1cdc4
[Warning] one or more build args were not consumed: [TARGETARCH TARGETOS TARGETPLATFORM]
86093f1cdc47c066aa70c832aa344172ddbc48d62f7b4a6a4220af68f96f9e6f
DEBU[0021] Called build.PersistentPostRunE(podman-remote build --log-level debug --platform linux/arm64/v8 --platform linux/amd64 --manifest quay.io/myuser/test .)
sudo podman manifest inspect quay.io/myuser/test
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 750,
"digest": "sha256:253ce960c995eae163a718a37f28ae7fcbc4621e0fa8b8e3ea31b9f87f679dc6",
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 750,
"digest": "sha256:2aa9c83e071de9b67f67be1fa07b9e6553516adf1f91f52f8ec6587f1af6bc5d",
"platform": {
"architecture": "arm64",
"os": "linux",
"variant": "v8"
}
}
]
}
sudo podman-remote images
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/myuser/test latest b4d48dc64828 13 minutes ago 1.09 kB
<none> <none> 86093f1cdc47 13 minutes ago 5.56 MB <---- actual arm64 image
<none> <none> b7c96a301838 13 minutes ago 5.82 MB <--- actual amd64 image
Note: I think one issue is that you are mixing Could you please update your podman client and podman-machine and try the steps above since this works with But if you still think i missed something or got something wrong please comment below and we can reopen the issue :) Cheers |
@flouthoc Everything works as you describe except the last step Nothing gets to docket.com sudo podman-remote --log-level debug manifest push docker.com/nycnewman/web-frontend:0.4 docker.com/nycnewman/web-frontend:0.4 |
Please ignore and leave closed. Issue resolve. Wrong authentication credentials. Thanks |
Description
Attempting to build multi-architecture images on MacOS using Podman appears to be broken and resulting uploaded image has only one architecture. It also appears that images are tagged as localhost/ or no tag at all.
podman installed on M1 Apple with Monterey 12.3. Also installed qemu-user-static into podman machine to enable multiarch execution.
The process appears to run through both amd64 and arm64/v8 builds and produces untagged images. The resulting tagged image appears to show localhost/tag:version rather than just tag:version (as seen in Docker equivalent) and image is tagged withonly one of the built architectures.
podman push
appears to only one of the images version (possibly only first in CLI list.Steps to reproduce the issue:
podman buildx build --platform linux/arm64/v8,linux/amd64 --manifest .
podman build --platform linux/arm64/v8 --platform linux/amd64 --manifest .
Results in the following images:
localhost/ 0.3 fed4c62a0ec4 7 minutes ago 1.09 kB
b691ec9a6b83 7 minutes ago 384 MB
64326be9ca34 9 minutes ago 434 MB
4aaa75398b62 12 minutes ago 370 MB
37aff2989fd9 13 minutes ago 405 MB
Running inspect of the final image shows only one Architecture and same when push'ed to Docker Hub
podman inspect a6775d31d3f4 | jq '.[0].Architecture'
"arm64"
The untagged image has:
podman inspect b691ec9a6b83 | jq '.[0].Architecture'
"amd64"
Describe the results you received:
podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
0.3 a6775d31d3f4 4 minutes ago 1.09 kB
c077690eddbe 4 minutes ago 370 MB
92355055a893 5 minutes ago 405 MB
91103aacc8fd 6 minutes ago 384 MB
5f3ab1c52800 8 minutes ago 434 MB
docker.io/library/python 3.9.11-slim-buster a5ac6948c534 9 days ago 115 MB
docker.io/kindest/node f9d67d6e8342 2 weeks ago 1.22 GB
Describe the results you expected:
Image in repo with multiple architectures tagged along with associated image layers
Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:Output of
cat /etc/*release
:Output of
uname -a
:Output of
cat /etc/containers/storage.conf
:The text was updated successfully, but these errors were encountered: