What is the purpose of the –platform flag in docker build and docker run and when is it needed?

Docker Fundamentals Hard

Docker Fundamentals — Hard

What is the purpose of the –platform flag in docker build and docker run and when is it needed?

Key points

  • --platform flag specifies target OS and CPU architecture
  • Necessary when building for a different platform than the build machine
  • Ensures compatibility for deployment on specific hardware

Ready to go further?

Related questions