The --quiet command is used with docker unless V=1 is passed to make,
and as a result stdout from docker is never visible by default, making
it hard to diagnose failures building / running containers.
Meanwhile passing V=1 is undesirable as that makes the entire build
system verbose.
Introduce a $(DOCKER_V) make variable which is initialized from $(V)
It is thus possible to display docker output without also enabling
make verbose output.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/docker/Makefile.include | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 7d4582b6a8..d58a280333 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -40,14 +40,14 @@ docker-qemu-src: $(DOCKER_SRC_COPY)
docker-image-%: $(DOCKER_FILES_DIR)/%.docker
$(call quiet-command, \
DOCKER_BUILDKIT=1 $(RUNC) build \
- $(if $V,,--quiet) \
+ $(if $(DOCKER_V),,--quiet) \
$(if $(NOCACHE),--no-cache, \
$(if $(DOCKER_REGISTRY),--cache-from $(DOCKER_REGISTRY)/qemu/$*)) \
--build-arg BUILDKIT_INLINE_CACHE=1 \
$(if $(NOUSER),, \
--build-arg USER=$(USER) \
--build-arg UID=$(UID)) \
- -t qemu/$* - < $< $(if $V,,> /dev/null),\
+ -t qemu/$* - < $< $(if $(DOCKER_V),,> /dev/null),\
"BUILD", $*)
# General rule for inspecting registry images.
@@ -73,7 +73,7 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
DEB_TYPE=$(DEB_TYPE) \
$(if $(DEB_URL),DEB_URL=$(DEB_URL),) \
$(DOCKER_SCRIPT) build -t qemu/debian-$* -f $< \
- $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
+ $(if $(DOCKER_V),,--quiet) $(if $(NOCACHE),--no-cache) \
$(if $(NOUSER),,--add-current-user) \
$(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES)) \
$(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)), \
@@ -105,16 +105,17 @@ debian-toolchain-run = \
$(if $(NOCACHE)$(NOFETCH), \
$(call quiet-command, \
$(DOCKER_SCRIPT) build -t qemu/$1 -f $< \
- $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
+ $(if $(DOCKER_V),,--quiet) \
+ $(if $(NOCACHE),--no-cache) \
--registry $(DOCKER_REGISTRY) --extra-files \
$(DOCKER_FILES_DIR)/$1.d/build-toolchain.sh, \
"BUILD", $1), \
$(call quiet-command, \
- $(DOCKER_SCRIPT) fetch $(if $V,,--quiet) \
+ $(DOCKER_SCRIPT) fetch $(if $(DOCKER_V),,--quiet) \
qemu/$1 $(DOCKER_REGISTRY), \
"FETCH", $1) \
$(call quiet-command, \
- $(DOCKER_SCRIPT) update $(if $V,,--quiet) \
+ $(DOCKER_SCRIPT) update $(if $(DOCKER_V),,--quiet) \
qemu/$1 \
$(if $(NOUSER),,--add-current-user) \
"PREPARE", $1))
@@ -231,7 +232,10 @@ docker-run: docker-qemu-src
-e TARGET_LIST=$(subst $(SPACE),$(COMMA),$(TARGET_LIST)) \
-e EXTRA_CONFIGURE_OPTS="$(EXTRA_CONFIGURE_OPTS)" \
-e TEST_COMMAND="$(TEST_COMMAND)" \
- -e V=$V -e J=$J -e DEBUG=$(DEBUG) \
+ -e V=$V \
+ -e DOCKER_V=$(DOCKER_V) \
+ -e J=$J \
+ -e DEBUG=$(DEBUG) \
-e SHOW_ENV=$(SHOW_ENV) \
$(if $(NOUSER),, \
-v $(DOCKER_QEMU_CACHE_DIR):$(DOCKER_QEMU_CACHE_DIR) \
--
2.52.0
On 07/01/2026 14.01, Daniel P. Berrangé wrote: > The --quiet command is used with docker unless V=1 is passed to make, > and as a result stdout from docker is never visible by default, making > it hard to diagnose failures building / running containers. > > Meanwhile passing V=1 is undesirable as that makes the entire build > system verbose. > > Introduce a $(DOCKER_V) make variable which is initialized from $(V) > > It is thus possible to display docker output without also enabling > make verbose output. > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> > --- > tests/docker/Makefile.include | 18 +++++++++++------- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include > index 7d4582b6a8..d58a280333 100644 > --- a/tests/docker/Makefile.include > +++ b/tests/docker/Makefile.include > @@ -40,14 +40,14 @@ docker-qemu-src: $(DOCKER_SRC_COPY) > docker-image-%: $(DOCKER_FILES_DIR)/%.docker > $(call quiet-command, \ > DOCKER_BUILDKIT=1 $(RUNC) build \ > - $(if $V,,--quiet) \ > + $(if $(DOCKER_V),,--quiet) \ Hmm, do we maybe want a DOCKER_V ?= $(V) earlier in this file, so that DOCKER_V gets enabled when running in normal verbose mode, too? Thomas
On Fri, Feb 06, 2026 at 02:48:34PM +0100, Thomas Huth wrote: > On 07/01/2026 14.01, Daniel P. Berrangé wrote: > > The --quiet command is used with docker unless V=1 is passed to make, > > and as a result stdout from docker is never visible by default, making > > it hard to diagnose failures building / running containers. > > > > Meanwhile passing V=1 is undesirable as that makes the entire build > > system verbose. > > > > Introduce a $(DOCKER_V) make variable which is initialized from $(V) > > > > It is thus possible to display docker output without also enabling > > make verbose output. > > > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> > > --- > > tests/docker/Makefile.include | 18 +++++++++++------- > > 1 file changed, 11 insertions(+), 7 deletions(-) > > > > diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include > > index 7d4582b6a8..d58a280333 100644 > > --- a/tests/docker/Makefile.include > > +++ b/tests/docker/Makefile.include > > @@ -40,14 +40,14 @@ docker-qemu-src: $(DOCKER_SRC_COPY) > > docker-image-%: $(DOCKER_FILES_DIR)/%.docker > > $(call quiet-command, \ > > DOCKER_BUILDKIT=1 $(RUNC) build \ > > - $(if $V,,--quiet) \ > > + $(if $(DOCKER_V),,--quiet) \ > > Hmm, do we maybe want a > > DOCKER_V ?= $(V) > > earlier in this file, so that DOCKER_V gets enabled when running in normal > verbose mode, too? I was on the fence about it. V=1 is traditionally focused on details of the commands being executed, rather than their output, but I don't mind much either way. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
© 2016 - 2026 Red Hat, Inc.