GithubHelp home page GithubHelp logo

Cannot cross build image to the target arm64 platform on amd64 host system when using RUN command in the containerfile about podman-desktop HOT 15 OPEN

odockal avatar odockal commented on July 18, 2024
Cannot cross build image to the target arm64 platform on amd64 host system when using RUN command in the containerfile

from podman-desktop.

Comments (15)

benoitf avatar benoitf commented on July 18, 2024

could you please be sure to clean all the build cache before, I saw some bugs using buildah sometimes

podman system prune

from podman-desktop.

odockal avatar odockal commented on July 18, 2024

Does not seem like the case.

from podman-desktop.

cdrage avatar cdrage commented on July 18, 2024

could you please be sure to clean all the build cache before, I saw some bugs using buildah sometimes

podman system prune

Looks like this is happening too on our "other extension" side. There is an issue posted regarding another error @odockal got.

When I did podman machine reset and recreated the machine it looks to have fixed it.

from podman-desktop.

benoitf avatar benoitf commented on July 18, 2024

I just tried on a macOS amd64 and it works

Screen.Recording.2024-04-30.at.15.45.51.mov

(it says aarch64 while I'm on a amd64 system)

from podman-desktop.

cdrage avatar cdrage commented on July 18, 2024

@odockal looks like it may be this issue: containers/podman#19961 as I was able to replicate it myself.

macOS and Linux is it working fine.

Windows is unfortunately having issues building an arm image. It looks like a caching issue as per the last comment.

Only way is to reset the podman machine and try again it seems.

from podman-desktop.

benoitf avatar benoitf commented on July 18, 2024

in all case issue is not in podman desktop codebase so I would not make it as a blocker for 1.10.x

from podman-desktop.

odockal avatar odockal commented on July 18, 2024

@cdrage @benoitf I believe that you are right. It might be out of control of podman desktop.
although, if people will start build cross-platform images on windows, they gonna hit this. I have never managed on windows amd64 host to build image with target arch64 platform nor via podman desktop nor using cli.

Update: I am not saying this is blocking release, though.

from podman-desktop.

odockal avatar odockal commented on July 18, 2024

Containerfile:

FROM fedora:39
RUN arch

cli command:
podman build -t fedora-arch --platform=linux/amd64 .

Result is the same for pd and podman cli: Error: building at STEP "RUN arch": while running runtime: exit status 1

from podman-desktop.

odockal avatar odockal commented on July 18, 2024

@cdrage @benoitf The workaround suggested in the last comment make it work!

from podman-desktop.

odockal avatar odockal commented on July 18, 2024

Workaround:

podman machine ssh
curl https://raw.githubusercontent.com/qemu/qemu/master/scripts/qemu-binfmt-conf.sh > qemu-binfmt-conf.sh
chmod +x qemu-binfmt-conf.sh
sudo mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
sudo ./qemu-binfmt-conf.sh --qemu-suffix "-static" --qemu-path "/usr/bin" -p yes
exit
podman build -t fedora-arch --platform=linux/arm64 .
STEP 1/2: FROM fedora:39
STEP 2/2: RUN arch
aarch64
COMMIT fedora-arch
--> 0b4b09c0e454
Successfully tagged localhost/fedora-arch:latest
0b4b09c0e45452807989881064fa4b94741246e2bc39ab29a91e38b2700256f7

from podman-desktop.

benoitf avatar benoitf commented on July 18, 2024

OK so definitely a podman issue. We might ask them to see if they can fix it in the podman machine

from podman-desktop.

benoitf avatar benoitf commented on July 18, 2024

I think it requires fixes but only in the machine

from podman-desktop.

benoitf avatar benoitf commented on July 18, 2024

https://github.com/containers/podman-machine-wsl-os/blob/main/.cirrus.yml probably a patch there

from podman-desktop.

benoitf avatar benoitf commented on July 18, 2024

Adding os/Windows label to the issue as it's windows specific ( on macOS it works as expected)

from podman-desktop.

benoitf avatar benoitf commented on July 18, 2024

removing 1.10.1 milestone and created containers/podman#22883

from podman-desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.