You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: --platform or --push not supported w/dockerComposeFile #404
I noticed that the ci project now supports a platform option with the following work devcontainers/ci#175 However, it breaks for me when I use this with dockerComposeFile. I can reproduce this locally too with the CLI.
(kencollins) - (~/Repositories/lamby-citest) 💎 3.1.3 🔄 main
> devcontainer build --workspace-folder . --image-name test --platform linux/amd64
[16 ms] @devcontainers/cli 0.29.0. Node.js v18.11.0. darwin 21.6.0 x64.
Error: --platform or --push not supported.
at uoe (/Users/kencollins/.nodenv/versions/18.11.0/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2045:27034)
at async aoe (/Users/kencollins/.nodenv/versions/18.11.0/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2045:25017)
{"outcome":"error","message":"--platform or --push not supported.","description":"--platform or --push not supported."}
Is this an oversight on behalf of the following work where some error handling needs to be removed?
Reacted by Jackson Miller, David Schmitt, M. R., Mike Priscella, Kristjan Rang, Dan, Stephanie Lanius, Luis Eduardo, bas-de-laine, pdurocher-vdm and 4 more
I've noticed the feature request tag being added, I presume this means that docker compose based devcontainers aren't able to be built for separate platforms? It would be helpful for readers to be able to understand the constraints and alternative approaches.
I also hit this issue and can confirm that multi-arch devcontainer builds only work with a Dockerfile, not a Docker Compose file.
A workaround I used to pre-build multi-arch dev containers in my CI/CD pipeline was to convert the compose config to a dedicated devcontainer-ci.json file that references this Dockerfile.
Activity
eduardolat commentedon Feb 3, 2025
+1
AlexKeySmith commentedon Jul 1, 2025
I've noticed the feature request tag being added, I presume this means that docker compose based devcontainers aren't able to be built for separate platforms? It would be helpful for readers to be able to understand the constraints and alternative approaches.
kverbyob commentedon May 13, 2026
I also hit this issue and can confirm that multi-arch devcontainer builds only work with a Dockerfile, not a Docker Compose file.
A workaround I used to pre-build multi-arch dev containers in my CI/CD pipeline was to convert the compose config to a dedicated devcontainer-ci.json file that references this Dockerfile.
A code snippet that can get you started: