I could not reproduce your issue with Docker Compose v2.5.1 on Mac M1. It is true, docker itself does not support building for multiple platforms, but Docker Desktop can emulate platforms so it should have worked. I tried on Linux too (amd64) and I could not get the same error message.
Have you changed the builder configuration?
docker builder list
The above command is wrong! I meant the following:
When I run docker builder list - that subcommand is not found. I get the following.
> docker builder list
Usage: docker builder COMMAND
build Build an image from a Dockerfile
prune Remove build cache
Run 'docker builder COMMAND --help' for more information on a command.
Am I missing something?
Additional info that might be helpful to understand this
No. Sorry, I meant docker buildx ls. I wrote my previous post too quickly.
It looks like your config is the same as mine including the versions, so I don’t know why it does not work for you.
The only difference I can see between your build and mine is that I could not try the whole Dockerfile since I don’t have the files from the host, but I doubt that could cause the error message. I only tried it with the first line where the platform is defined.
When I said nuked my Docker installation above I should have been clearer, it meant: 1. uninstall 2. clean out all files left over 3. install 4. do a docker system reset just to make sure I didn’t have anything left over.