Closed nycnewman closed 2 years ago
Hi @nycnewman , Thanks for creating the issue.
I think podman build --platform linux/arm64/v8 --platform linux/amd64 --manifest .
is not a valid command. It should fail with Error: no context directory and no Containerfile specified
Could you try this podman build --platform linux/arm64/v8 --platform linux/amd64 --manifest somename .
and then podman manifest inspect somename
, it shows manifest for both the arch.
Then try podman manifest push somename
Overall this seems to be an issue with podman-remote
and podman-machine
setup so i'm moving that there and I'm unable to reproduce with latest version on podman-machine
.
@nycnewman I am closing this issue since you need to push manifest and works fine with podman-remote
and podman-machine
setup but please feel free to reopen if you are still facing issue with macOS
as I did not try on macOS
but it should work.
@ashley-cui @baude Could you try this on macOS
please.
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 REPOSITORY TAG IMAGE ID CREATED SIZE docker.io/nycnewman/web-frontend 0.3 113c1594fed2 About an hour ago 1.09 kB
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 https://github.com/containers/podman/issues/13676#issuecomment-1081983138 your second push override the first manifest push
.
You can see my steps below
1) build --platform linux/arm64 --platform linux/amd64
with --manifest
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-remote manifest inspect quay.io/myuser/test
should show both images
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
sudo podman-remote images
REPOSITORY TAG IMAGE ID CREATED SIZE quay.io/myuser/test latest b4d48dc64828 13 minutes ago 1.09 kB
@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 INFO[0000] podman-remote filtering at log level debug DEBU[0000] Called push.PersistentPreRunE(podman-remote --log-level debug manifest push docker.com/nycnewman/web-frontend:0.4 docker.com/nycnewman/web-frontend:0.4) DEBU[0000] SSH Ident Key "/Users/edwardnewman/.ssh/podman-machine-default" SHA256:BSrlWKbezpDjEGankd+Dv0xjISCgPBLFugZup5AIfbU ssh-ed25519 DEBU[0000] Found SSH_AUTH_SOCK "/private/tmp/com.apple.launchd.0hgtBR4HKa/Listeners", ssh-agent signer(s) enabled DEBU[0000] DoRequest Method: GET URI: http://d/v4.1.0/libpod/_ping DEBU[0000] Loading registries configuration "/etc/containers/registries.conf" DEBU[0000] No credentials matching gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0000] No credentials matching gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0000] Looking up in credential helper gcloud based on credHelpers entry in /Users/edwardnewman/.docker/config.json DEBU[0001] Found credentials for gcr.io in credential helper containers-auth.json in file /Users/edwardnewman/.docker/config.json DEBU[0001] No credentials matching staging-k8s.gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0001] No credentials matching staging-k8s.gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0001] Looking up in credential helper gcloud based on credHelpers entry in /Users/edwardnewman/.docker/config.json DEBU[0001] Found credentials for staging-k8s.gcr.io in credential helper containers-auth.json in file /Users/edwardnewman/.docker/config.json DEBU[0001] No credentials matching asia.gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0001] No credentials matching asia.gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0001] Looking up in credential helper gcloud based on credHelpers entry in /Users/edwardnewman/.docker/config.json DEBU[0002] Found credentials for asia.gcr.io in credential helper containers-auth.json in file /Users/edwardnewman/.docker/config.json DEBU[0002] No credentials matching registry.neuvector.com found in /Users/edwardnewman/.config/containers/auth.json DEBU[0002] No credentials matching registry.neuvector.com found in /Users/edwardnewman/.config/containers/auth.json DEBU[0002] No credentials matching registry.neuvector.com found in /Users/edwardnewman/.dockercfg DEBU[0002] No credentials for registry.neuvector.com found DEBU[0002] Found credentials for docker.com in credential helper containers-auth.json in file /Users/edwardnewman/.config/containers/auth.json DEBU[0002] No credentials matching eu.gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0002] No credentials matching eu.gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0002] Looking up in credential helper gcloud based on credHelpers entry in /Users/edwardnewman/.docker/config.json DEBU[0003] Found credentials for eu.gcr.io in credential helper containers-auth.json in file /Users/edwardnewman/.docker/config.json DEBU[0003] No credentials matching marketplace.gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0003] No credentials matching marketplace.gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0003] Looking up in credential helper gcloud based on credHelpers entry in /Users/edwardnewman/.docker/config.json DEBU[0003] Found credentials for marketplace.gcr.io in credential helper containers-auth.json in file /Users/edwardnewman/.docker/config.json DEBU[0003] No credentials matching us.gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0003] No credentials matching us.gcr.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0003] Looking up in credential helper gcloud based on credHelpers entry in /Users/edwardnewman/.docker/config.json DEBU[0004] Found credentials for us.gcr.io in credential helper containers-auth.json in file /Users/edwardnewman/.docker/config.json DEBU[0004] No credentials matching docker.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0004] No credentials matching docker.io found in /Users/edwardnewman/.config/containers/auth.json DEBU[0004] No credentials matching docker.io found in /Users/edwardnewman/.dockercfg DEBU[0004] No credentials for docker.io found DEBU[0004] DoRequest Method: POST URI: http://d/v4.1.0/libpod/manifests/docker.com%2Fnycnewman%2Fweb-frontend:0.4/registry/docker.com%2Fnycnewman%2Fweb-frontend:0.4 DEBU[0010] Called push.PersistentPostRunE(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
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