docker,

Resolve: "WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8)"

Nov 23, 2022 · 1 min read · Post a comment

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

  1. First, make sure to add the --platform linux/amd64 option as part of the docker run command.

  2. If that doesn’t work, try using a different Docker image version that’s compatible with the CPU architecture (amd64 or arm64).

  3. 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.