Skip to content
Discussion options

You must be logged in to vote

Hii MrMiningIR,

$BUILDPLATFORM is a special variable that Docker only fills in automatically when BuildKit is doing the build. If the build falls back to the old "classic" builder, that variable stays empty - and --platform="" is invalid, which is exactly this error.

This almost always happens with the legacy Python docker compose (v1) binary which matches the error format you are seeing (ERROR: Service 'X' failed to build). On Kali, apt install docker-compose still often pulls in this old v1 package instead of the modern Compose plugin, and v1 doesn't reliably wire up BuildKit.

Fix:

  1. Switch to Compose V2 (the docker compose command, with a space - not the hyphenated docker-compose):
sud…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MrMiningIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants