As I was trying to get my Python Docker Compose stack up and running on my MacBook Pro, I’ve noticed the following message: Warning: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
.
Note you might receive the quite opposite image/host platform error depending on the current OS/CPU architecture running on your workstation.
Prerequisites
- Docker
Solution
First, make sure to add the
--platform linux/amd64
option as part of thedocker run
command.If that doesn’t work, try using a different Docker image version that’s compatible with the CPU architecture (amd64 or arm64).
As a last resort, in case there is no Docker image version that’s suitable with the CPU architecture, try replacing the service that’s causing the issue with another one. I’m sure MySQL is not the only relation database out there, so to speak.
Conclusion
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.