buildx: failed to load LLB: runtime execution on platform linux/arm64 not supported

We started using the new docker buildx to build arm64 images. But it is not working with debian base image.

DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform linux/arm64 --load --pull -t kubedb/operator:v0.13.0-rc.0-dbg_linux_arm64 -f bin/.dockerfile .
container: kubedb/operator:v0.13.0-rc.0-dbg_linux_arm64
[+] Building 1.9s (3/3) FINISHED                                                                                                                                                                            
 => [internal] load build definition from .dockerfile-DBG-linux_arm64                                                                                                                                  0.5s
 => => transferring dockerfile: 652B                                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                                      0.3s
 => => transferring context: 2B                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/debian:stretch                                                                                                                                      1.2s
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to load LLB: runtime execution on platform linux/arm64 not supported
Makefile:205: recipe for target 'bin/.container-kubedb_operator-v0.13.0-rc.0_linux_arm64-DBG' failed
make[2]: *** [bin/.container-kubedb_operator-v0.13.0-rc.0_linux_arm64-DBG] Error 1
Makefile:105: recipe for target 'push-linux_arm64' failed
make[1]: *** [push-linux_arm64] Error 2
Makefile:307: recipe for target 'release' failed
make: *** [release] Error 2

Here is the docker file:

FROM debian:stretch

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

RUN set -x \
  && apt-get update \
  && apt-get install -y --no-install-recommends apt-transport-https ca-certificates tzdata locales openssl \
  && rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man /tmp/* \
  && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
  && echo 'Etc/UTC' > /etc/timezone && dpkg-reconfigure tzdata

ENV TZ     :/etc/localtime
ENV LANG   en_US.utf8
ENV LC_ALL en_US.UTF-8

ADD bin/linux_arm64/operator /operator

ENTRYPOINT ["/operator"]

I am getting anything with google search for failed to solve with frontend dockerfile.v0: failed to load LLB: runtime execution on platform linux/arm64 not supported.

On the same machine, the following arm64 image is building ok.

FROM gcr.io/distroless/base

ADD bin/linux_arm64/operator /operator

# This would be nicer as `nobody:nobody` but distroless has no such entries.
USER 65535:65535

ENTRYPOINT ["/operator"]

Any help is appreciated.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 24 (2 by maintainers)

Commits related to this issue

Most upvoted comments

I had a mybuilder that was not working.

$ env DOCKER_CLI_EXPERIMENTAL=enabled docker buildx ls
NAME/NODE    DRIVER/ENDPOINT             STATUS  PLATFORMS
mybuilder *  docker-container                    
  mybuilder0 unix:///var/run/docker.sock running linux/amd64, linux/386
default      docker                              
  default    default                     running linux/amd64

I rm-rf the old builder and then created a new one and things are working now.

$ docker buildx create --name nubuilder
nubuilder
$ docker buildx use nubuilder
$ docker buildx inspect --bootstrap
[+] Building 9.6s (1/1) FINISHED                                                                                                                                                                            
 => [internal] booting buildkit                                                                                                                                                                        9.6s
 => => pulling image moby/buildkit:master                                                                                                                                                              5.8s
 => => creating container buildx_buildkit_nubuilder0                                                                                                                                                   3.8s
Name:   nubuilder
Driver: docker-container

Nodes:
Name:      nubuilder0
Endpoint:  unix:///var/run/docker.sock
Status:    running
Platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6

So, the problem was the old builder did not have arm64. I don’t know why. Thanks @Carlosedp helping me get this working.

For me running

docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d

solved the problem.

$ docker buildx ls
NAME/NODE DRIVER/ENDPOINT             STATUS   PLATFORMS
test *    docker-container                     
  test0   unix:///var/run/docker.sock inactive linux/amd64, linux/arm64
default   docker                               
  default default                     running  linux/amd64, linux/386

# remove the buildx
$ docker buildx rm test

# enabled binfmt_misc
$ docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64

# create the builder
$ docker buildx create  --name test --platform linux/amd64,linux/arm64

# start the buildx
$ docker buildx inspect test --bootstrap

# set current buidler instance
$ docker buildx use test

# build the multi images
$ docker buildx build -t zhangguanzhang/keepalived:v2.0.20 . --push --platform linux/amd64

@HeroCC: try docker run --rm --privileged multiarch/qemu-user-static --reset -p yes instead and it should work

Note that docker buildx ls will not list linux/arm/v7 as platform but it works.

I found that on my work image, I have to constantly re-run the multiarch/qemu-user-static process after each boot. It’s a simple enough workaround for us anyway.

Delete the old builder and create a new builder.

On Fri, Aug 30, 2019, 5:50 PM Evandro Nascimento notifications@github.com wrote:

Hi, have the same problem, am working with rhel7 and runed’install qemu-user’, but when run ‘buildx ls’, it show only ‘running linux/amd64, linux/386’, and it don’t show ‘linux/amd64, linux/arm64…’. What can I have do, please?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/docker/buildx/issues/138?email_source=notifications&email_token=AAAXEXQ6LNPMVBR3CWTPPITQHGIZRA5CNFSM4IOX6CDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5S3WEQ#issuecomment-526760722, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAXEXUA4XDHSWIJAAVWAT3QHGIZRANCNFSM4IOX6CDA .

Thanks it’s works for me on azure pipelines:

  • I installed qemu
  • I removed and created a new builder

It worked for me after installing qemu-user and running the getting started tutorial at multiarch/qemu-user-static

You need to restart or recreate the builder for it to pick up new qemu support.

Sorry to bug anyone, but I’m having the same issue. I’ve been trying to get this to work for a while now but can’t seem to do it. I run the following, and yet my buildx builder doesn’t have the new platforms supported, and the build gets that same error. The base image I’m trying to build is ubuntu:18.04 and I’m running on GitlabCI shared infrastructure (docker:stable image, dind service running, privileged containers enabled).

docker run --rm --privileged multiarch/qemu-user-static:register --reset
docker buildx create --use
docker buildx inspect --bootstrap
  * Platforms: linux/amd64, linux/386
docker buildx build --load --platform "linux/amd64,linux/arm64,linux/arm/v7" -t name .

Full Build Logs: https://gitlab.com/moos-ivp/moosdocker/-/jobs/396347211 CI Configuration / scripts: https://gitlab.com/moos-ivp/moosdocker/blob/d8bc10615ddf928c8fda8cf250cfa2c973734e29/.gitlab-ci.yml

Thank you!

Thanks @tonistiigi . It seems that I had already installed it but still getting this error.

$ sudo apt-get install qemu-user-static
[sudo] password for tamal: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
qemu-user-static is already the newest version (1:2.11+dfsg-1ubuntu7.17).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ env DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform linux/arm64 --load --pull -t tigerworks/operator:fdocker .
[+] Building 1.5s (3/3) FINISHED                                                                                                                                                                            
 => [internal] load .dockerignore                                                                                                                                                                      0.4s
 => => transferring context: 2B                                                                                                                                                                        0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                   0.6s
 => => transferring dockerfile: 32B                                                                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/debian:stretch                                                                                                                                      0.7s
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to load LLB: runtime execution on platform linux/arm64 not supported