aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2016-11-30 23:33:40 +0100
committerStephane Desneux <stephane.desneux@iot.bzh>2016-11-30 23:43:45 +0100
commit5e50ec8d65705b41140d06ec13611f0b3108f7b9 (patch)
tree8e7f30d8c883ac401e0d02962bff05be3e66f06d /Makefile
parent7417e97927e5a06dddb3d2166e5ccc06a1a16aae (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--Makefile15
1 files changed, 7 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 414cd18..de734a8 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
+