Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker: exec /usr/local/openjdk-11/bin/java: exec format error

Image m2 works fine on macbook. It gives an error when I install and run it on Ubuntu.

command;

docker pull mademustafa/postmage:latest
docker run -it mademustafa/postmage:latest

Error;

WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and a specific platform was not requested
exec /usr/local/openjdk-11/bin/java: exec format error

I did the installation according to the following documents;

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04

https://ktor.io/docs/docker.html#build-run

(Ubuntu 20.04 (LTS) x64)

like image 812
Mustafa Maden Avatar asked Oct 27 '25 05:10

Mustafa Maden


1 Answers

solved;

docker buildx build --platform linux/amd64,linux/arm64 -t madenmustafa/postmage --push .
like image 157
Mustafa Maden Avatar answered Oct 29 '25 07:10

Mustafa Maden