Does a Docker image built in x86_64 work when pulled in aarch64/s390x?

363 Views Asked by At

If I run docker build on a x86_64/amd64 Linux, and then save the resulting image as a .tar file via docker save, and then place it on another Linux machine which is aarch64/arm64, will it work normally there (after docker load and docker run)? Also, what if the second machine is s390x (IBM Z) instead of aarch64/arm64?

1

There are 1 best solutions below

1
Andy Su On

You can do docker run by passing specific platform setup

docker run --platform linux/amd64

Not always working, But it is indeed a trick way sometimes.