We use cookies to understand how people use Depot.
🚀 Now available: macOS GitHub Actions Runners
← Back to changelog

The build.platforms key has been part of the Compose spec since 2022 but has gone unimplemented in upstream buildx.

The build.platforms key allows you to specify the platforms you want to build for in your compose file for a defined service. This is useful when you want to build a multi-platform image for a service defined in your Compose file:

backend:
  build:
    context: .
    platforms:
      - 'linux/amd64'
      - 'linux/arm64'

But, with docker buildx bake -f <your-compose-file>, this will fail to build the image for the specified platforms. This is because docker buildx bake does not support the build.platforms key in the Compose file.

We've upgraded our depot bake command to fix this annoyance and fully support build.platforms in a Compose file.