简体   繁体   中英

Docker: Using buildx to support multiple architecture, do I need it on the parent image?

I'm trying here, after having posted the following on the Docker Forum .

I've tried the buildx command explained in the documentation (from my Intel-based Mac):

# This normally works with build, without buildx
git clone https://github.com/Rothamsted/knetminer
cd knetminer
# buildx is the new thing I'm trying, to have multi-arch support
docker buildx build --platform linux/amd64,linux/arm64 -t knetminer/knetminer -f docker/Dockerfile --push .

However, when I try the published image on an ARM64, I still get the usual: standard_init_linux.go:211: exec user process caused “exec format error”

Is buildx enough to obtain multiple-architecture images? Or do I need more (eg, Linux images that actually support ARM)?

My image is based on another one, which is based on a Tomcat +Linux image. Do I need to re-run buildx on all the parents?

For those interested in details, this is about building the image for our own application from its codebase, documentation here .

Thanks in advance.

standard_init_linux.go:211: exec user process caused “exec format error”

Does happen, when you try to run a image for another architecture on your devices.

Your base image must support the choosen architecture too. So you must build the parent by yourself for your architecture, if it does not support your architecture.

In dockerhub you can see supported architectures under tags . Alternative you can use the docker image inspect command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM