Description
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