Docker builder build vs docker build

bli00

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?

funnydman

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 implement builder 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 call docker 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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related