I am attempting to use "docker-compose up" on the command line to run a simulator using noVNC but am getting the error "image with reference [my image] was found but does not match the specified platform: wanted linux/amd64, actual: linux/arm64/v8". I’ve seen some solutions for docker run and docker build, but docker-compose doesn’t seem to take the platform argument on the command line. Any ideas? Does it have anything to do with the Ubuntu virtual machine that’s acting as the host in this case?
I have added the "–platform" flag within the Dockerfile, added "platform: linux/amd64" inside docker-compose.yaml, and even attempted to set the default platform using "export DOCKER_DEFAULT_PLATFORM=linux/amd64", but the error keeps coming back.
2
Answers
You can make it using args
and put in your
docker-compose.yml
You should declare
platform
withlinux/amd64
inside of service. For sample can use this form my project.