Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47342 )
Change subject: util/docker: Minor Makefile updates ......................................................................
util/docker: Minor Makefile updates
- Update url for docker install instructions. - Update docker-cleanall target to require verification. - Update docker-jenkins-attach target to check for docker and use docker variable. - Update spaces to tabs in the docs targets.
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: Ic1e1a545024fe1fdc37d7d8c7e6f54f124d1697b Reviewed-on: https://review.coreboot.org/c/coreboot/+/47342 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Stefan Reinauer stefan.reinauer@coreboot.org --- M util/docker/Makefile 1 file changed, 17 insertions(+), 12 deletions(-)
Approvals: build bot (Jenkins): Verified Stefan Reinauer: Looks good to me, approved
diff --git a/util/docker/Makefile b/util/docker/Makefile index eaa26e1..8b1d0ef 100644 --- a/util/docker/Makefile +++ b/util/docker/Makefile @@ -31,8 +31,8 @@
test-docker: $(if $(DOCKER),,\ - $(warning Docker command not found. Please install docker) \ - $(warning https://docs.docker.com/engine/installation ) \ + $(warning Error: Docker command not found. Please install docker) \ + $(warning Instructions: https://docs.docker.com/engine/install/ ) \ $(error halting))
test-docker-login: test-docker @@ -82,14 +82,19 @@ docker-clean: clean-coreboot-containers @$(MAKE) clean-coreboot-images
-docker-cleanall: +docker-cleanall: test-docker +ifeq($(Y),1) @if [ -n "$$($(DOCKER) ps -a | grep -v "CONTAINER")" ]; then \ - $(DOCKER) kill $$($(DOCKER) ps -a | grep -v "CONTAINER" | sed 's|\s.*$$||'); \ + $(DOCKER) kill $$($(DOCKER) ps | grep -v "CONTAINER" | sed 's|\s.*$$||') ; \ $(DOCKER) rm $$($(DOCKER) ps -a | grep -v "CONTAINER" | sed 's|\s.*$$||'); \ fi @if [ -n "$$($(DOCKER) images | grep -v "REPOSITORY")" ]; then \ $(DOCKER) rmi $$($(DOCKER) images | grep -v "REPOSITORY" | tr -s ' ' | cut -f3 -d ' '); \ fi +else + echo "This will remove *ALL* docker containers from your machine." + echo "If this is what you want, run 'make docker-cleanall Y=1'" +endif
$(DOCKER_CCACHE): @mkdir -p $@ @@ -153,8 +158,8 @@ /bin/bash -l
docker-jenkins-attach: USER=root -docker-jenkins-attach: - docker exec --user $(USER) \ +docker-jenkins-attach: test-docker + $(DOCKER) exec --user $(USER) \ -e COLUMNS=$(shell tput cols) -e LINES=$(shell tput lines) -e TERM=$(TERM) \ -it "$$(docker ps | grep coreboot-jenkins-node | cut -f1 -d' ')" \ /bin/bash -l @@ -162,16 +167,16 @@ docker-build-docs: test-docker docker-build-docs: $(DOCKER) run -it --rm \ - --user $(UID):$(GID) \ - -v "$(top)/:/data-in/:ro" \ - -v "$(top)/Documentation/_build/:/data-out/" \ - doc.coreboot.org + --user $(UID):$(GID) \ + -v "$(top)/:/data-in/:ro" \ + -v "$(top)/Documentation/_build/:/data-out/" \ + doc.coreboot.org
docker-livehtml-docs: test-docker docker-livehtml-docs: $(DOCKER) run -it --rm \ - --net=host -v "$(top)/:/data-in/:ro" \ - doc.coreboot.org livehtml + --net=host -v "$(top)/:/data-in/:ro" \ + doc.coreboot.org livehtml
help: @echo "Commands for working with docker images:"