On Docker's documentation page, there's an entry for docker builder which is the parent command of docker builder build. docker builder build
seems like the exact same command as docker build
, and the documentations provides no information about it. Are they literally the same thing?
Yes, currently they are behaving the same and builder
is an alias. To understand why builder
subcommand was presented, look at the commit message:
Add new
builder
subcommand and implementbuilder prune
to prune build cache.This patch adds a new builder subcommand, allowing to add more builder-related commands in the future. Unfortunately
build
expects an argument so could not be used as a subcommand.This also implements
docker builder prune
, which is needed to prune the builder cache manually without having to calldocker system prune
.Today when relying on the legacy builder, users are able to prune dangling images (used as build cache) by running
docker image prune
. This patch allows the same usecase with buildkit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With