diff options
author | 2016-11-30 23:33:40 +0100 | |
---|---|---|
committer | 2016-11-30 23:43:45 +0100 | |
commit | 5e50ec8d65705b41140d06ec13611f0b3108f7b9 (patch) | |
tree | 8e7f30d8c883ac401e0d02962bff05be3e66f06d /Makefile | |
parent | 7417e97927e5a06dddb3d2166e5ccc06a1a16aae (diff) |
more fixes: apt more robust, versioning support, create_container script
Change-Id: Id4d8b93c935d27919aa945660ad614f8c73368de
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -4,7 +4,7 @@ REGISTRY=docker.automotivelinux.org REPO=agl NAME=worker -VERSION=2.1 +VERSION=$(shell tail -1 VERSION) # --------------------------------------------------- # --- computed - don't touch ! @@ -24,6 +24,7 @@ help: @echo "- push-latest: push the image to registry $(REGISTRY) and also tag as 'latest'" @echo "- export: export the image to a compressed archive" @echo "- export-latest: export the latest image to a compressed archive" + @echo "- show-image: dumps the current image name" @echo "" @echo "Variables:" @echo "- Docker registry: REGISTRY=$(REGISTRY)" @@ -58,13 +59,7 @@ clean: # remove spurious containers and images left by broken builds .PHONY:distclean distclean: clean - @for imgid in $$(docker images | grep "^<none>" | awk '{print $$3}'); do \ - for cntid in $$(docker ps -a -f ancestor=$$imgid --format "{{.ID}}"); do \ - echo "Stop container $$cntid"; \ - docker stop $$cntid; \ - echo "Remove container $$cntid"; \ - docker rm $$cntid; \ - done; \ + for imgid in $$(docker images | grep "^<none>" | awk '{print $$3}'); do \ echo "Remove image $$imgid"; \ docker rmi $$imgid; \ done @@ -103,3 +98,7 @@ export: @echo "Export image to docker_$(REPO)_$(NAME)-$(VERSION).tar.xz" docker save $(IMAGE_NAME) | xz -T0 -c >docker_$(REPO)_$(NAME)-$(VERSION).tar.xz +.PHONY:show-image +show-image: + @echo $(IMAGE_NAME) + |