Skip to content
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

[QUESTION]I'm having difficulty building a multi-arch image because the TARGETPLATFORM variable is not available in older buildah versions. #100

Open
daiaji opened this issue Jul 16, 2022 · 2 comments
Labels
question Further information is requested

Comments

@daiaji
Copy link

daiaji commented Jul 16, 2022

containers/buildah@bee0a1f
Basically, it can be confirmed that the TARGETPLATFORM variable of buildah earlier than 1.26.0 is faulty.
But even the buildah version in the Ubuntu 22.04 software source is only 1.23.1.
This is obviously not enough, so I tried to install a higher version of buildah, but encountered difficulties.
actions/runner-images#2703 (comment)

sudo apt-get install -y buildah -o Dpkg::Options::="--force-overwrite"
But I'm lucky. This order works.
However, it may be necessary to inform this fault in the document.

Examples.
$ buildah build --platform linux/arm64 .

FROM --platform=$BUILDPLATFORM alpine
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I'm compiling for $TARGETPLATFORM on $BUILDPLATFORM and tagging for $TARGETPLATFORM"

Wrong output.
I'm compiling for linux/amd64 on linux/amd64 and tagging for linux/amd64

Correct output.
I'm compiling for linux/arm64 on linux/amd64 and tagging for linux/arm64

@daiaji daiaji added the question Further information is requested label Jul 16, 2022
@ramonsmits
Copy link

This isn't working for me either. I created the following runner request:

For me the issue is the TARGETARCH arg is not set by old versions.

The was a prior question about versions:

I followed the advice from @tetchel to run an update script but that isn't working for me. I also tried the following but unfortunately no new version:

@k9withabone
Copy link

I got Buildah working in a container after some trial and error. This let's you run the latest version. See the release-container workflow for Podlet. However, I haven't tried using this action with that setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants