[BUG] pull_policy: build
lacks equivalent to --quiet-pull
#12462
Labels
pull_policy: build
lacks equivalent to --quiet-pull
#12462
Description
TL;DR:
--quiet-build
equivalent to--quiet-pull
ifpull_policy: build
is behaving as intended.build.tags
when present, instead of only concatenating project + service names.Similar to this issue which appears to have been resolved with
docker compose run --quiet-pull
, it would be nice if there was an equivalent for services that build locally instead of pull.Doc reference:
If the service has no
image
field, it'll derive one for the image name to be built from the compose project + service names. Build tags are always append, so if you did not want the implicit image name, you would need to provide an explicit one viaimage
.Doing so will have the
pull_policy
by default try to pull that remotely if there is no existing image. If there is an existing image, then there is no redundant output.Steps To Reproduce
my-service-a
builds the image asmy-project-my-service-a
my-service-b
has a once off warning that the pull failed if the name doesn't resolve remotely:However for
my-service-c
where a local build is enforced viapull_policy: build
, but the image is tagged with a customized name (grouping underlocalhost/
for example), this always results in noise for building the image even when there is no context change:That seems redundant? It either should not be output, or some option akin to
--quiet-pull
should be supported to omit that noise.Meanwhile:
my-service-b
config is valid to use if you're sure the image name chosen won't resolve remotely.my-service-a
is not really desirable. I'm not sure how likely it is someone would depend upon that and explicitbuild.tags
, so ifbuild.tags
were specified perhaps the fallback image name could preferbuild.tags[0]
(first tag), and thuspull_policy: build
would not be necessary while also avoiding the noise output demonstrated viamy-service-c
.Compose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: