Closed switt4 closed 1 month ago
docker build
is an alias for docker buildx build
. Both require a positional argument. In this example, that's .
, declaring the build context to use. Unfortunately it's easy to miss a .
in an example command. We could change it to something like docker build [OPTIONS...] CONTEXT
, but 9 times out of 10 that's .
, and it's what we usually use as an example.
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
/lifecycle locked
Is this a docs issue?
Type of issue
Information is incorrect
Description
Under the "Build multi-platform images" sub-section in this page, the example command for building containers for multiple platforms appears to be incorrect:
This is what is in the documenation:
docker build --platform linux/amd64,linux/arm64 .
This command gives this error:
Should this example command be:
docker buildx build --platform linux/amd64,linux/arm64
?Thanks.
Location
https://docs.docker.com/build/building/multi-platform/#build-multi-platform-images
Suggestion
It appears as if the
buildx
option is missing from this example command. So, updating it to:docker buildx build --platform linux/amd64,linux/arm64
should fix the error in the documentation.