Closed aufarg closed 12 months ago
I check this thanks for reporting.
@aufarg This issue does not persists in recent version of podman and buildah. Could you please try with more recent version and report back. I'm closing this issue.
Still happening to me, but when I checked podman version
there's two output, one is 4.7.0
which is latest release in GitHub and the other is 4.6.2
. Not sure how I can update the Server
? podman machine info
shows that it's already 4.7.0
$ podman version
Client: Podman Engine
Version: 4.7.0
API Version: 4.7.0
Go Version: go1.21.1
Git Commit: 073183fe1723d7bda826b574437891976a958c65
Built: Wed Sep 27 23:35:55 2023
OS/Arch: darwin/arm64
Server: Podman Engine
Version: 4.6.2
API Version: 4.6.2
Go Version: go1.20.7
Built: Wed Sep 13 04:07:26 2023
OS/Arch: linux/arm64
$ podman machine info
Host:
Arch: arm64
CurrentMachine: podman-machine-default
DefaultMachine: podman-machine-default
EventsDir: <redacted>
MachineConfigDir: <redacted>
MachineImageDir: <redacted>
MachineState: Running
NumberOfMachines: 1
OS: darwin
VMType: qemu
Version:
APIVersion: 4.7.0
Built: 1695828955
BuiltTime: Wed Sep 27 23:35:55 2023
GitCommit: 073183fe1723d7bda826b574437891976a958c65
GoVersion: go1.21.1
Os: darwin
OsArch: darwin/arm64
Version: 4.7.0
So your server is still on older version i think you will need to stop podman machine
and delete using podman machine rm
and create a new instance using podman machine init
Still happens to me even on 4.7.0 both client/server. I'll try to debug this further.
$ podman version
Client: Podman Engine
Version: 4.7.0
API Version: 4.7.0
Go Version: go1.21.1
Git Commit: 073183fe1723d7bda826b574437891976a958c65
Built: Wed Sep 27 23:35:55 2023
OS/Arch: darwin/arm64
Server: Podman Engine
Version: 4.7.0
API Version: 4.7.0
Go Version: go1.20.8
Built: Thu Sep 28 02:24:25 2023
OS/Arch: linux/arm64
$ podman manifest inspect localhost/test-podman:latest
Error: getting content of manifest list or image localhost/test-podman:latest: reading image "docker://localhost/test-podman:latest": pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused
$ podman build -f Dockerfile --platform linux/amd64 --manifest localhost/test-podman:latest $PWD
[1/2] STEP 1/2: FROM alpine:3.18.0 AS builder
podman [1/2] STEP 2/2: RUN touch /file
--> Using cache 7c10c346f84702cb4a1dd91f5905b0913ec0675df692d684518c66344fd96e9c
--> 7c10c346f847
[2/2] STEP 1/3: FROM alpine:3.18.0
[2/2] STEP 2/3: COPY --from=builder /file /file
--> Using cache a3188f32fef763e49a413095d1ebfdfcd6d4241daa70b838d2c9bff020784446
--> a3188f32fef7
[2/2] STEP 3/3: RUN echo test
--> Using cache 7b78b0906753b9a9c8bdb691c49d23337bdf61408d8fe0e9bc93b41076848f87
--> 7b78b0906753
7b78b0906753b9a9c8bdb691c49d23337bdf61408d8fe0e9bc93b41076848f87
$ podman manifest inspect localhost/test-podman:latest
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 901,
"digest": "sha256:886c1d30caf857aefaa25a52b7cfe5559067b443311ad03a3a53beb2b32b9e0d",
"platform": {
"architecture": "amd64",
"os": "linux",
"variant": "v8"
}
}
]
}
Description
I'm currently trying to use multi-stage build to build a Go binary on an
arm64
machine asamd64
image. I usedarm64
image to build the binary and then copied to theamd64
image on the next build stage. The resulting manifest correctly specified the OS and Arch aslinux
andamd64
, but it also specify Variant asv8
.After some tinkering, I find that the issue is because of
COPY --from
directive. On the Dockerfile used for repro below, if we remove theCOPY
, the manifest correctly unset the variant.Steps to reproduce the issue:
Dockerfile
with the following content:Describe the results you received:
$ podman manifest inspect localhost/test-podman:latest
Describe the results you expected:
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:*Output of `cat /etc/release`:**
Output of
uname -a
: (Unfortunately can't paste the whole thing)Output of
cat /etc/containers/storage.conf
: