aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Mortier <mort@cantab.net>2019-03-26 14:59:07 +0000
committerRichard Mortier <mort@cantab.net>2019-03-26 14:59:07 +0000
commitbcb417f606a054c24aa646b3e4f95f82252247e1 (patch)
tree4c4e7b43a93fa51f5b388a6d6fa6658d05212ad9
parent1ee5cd4671176df7acac88ae9cca6355aa845663 (diff)
downloaddocker-abuild-bcb417f606a054c24aa646b3e4f95f82252247e1.tar.bz2
docker-abuild-bcb417f606a054c24aa646b3e4f95f82252247e1.tar.xz
make: minor fixes, explicitly declare base image tags
Signed-off-by: Richard Mortier <mort@cantab.net>
-rw-r--r--Makefile21
1 files changed, 14 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index fede06e..fd0c9a0 100644
--- a/Makefile
+++ b/Makefile
@@ -2,31 +2,38 @@
IMG = mor1/abuild
VOLS = bin etc lib sbin usr var
-TAGS := $(shell \
- curl -s https://registry.hub.docker.com/v1/repositories/alpine/tags \
- | jq -r '.[].name' \
-)
-TAGS = edge
+# BRANCHES := $(shell \
+# curl -s https://api.github.com/repos/alpinelinux/aports/branches \
+# | jq -r '.[].name' \
+# )
+# TAGS := $(shell \
+# curl -s https://registry.hub.docker.com/v1/repositories/alpine/tags \
+# | jq -r '.[].name' \
+# )
+TAGS = 2.6 2.7 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 edge
.PHONY: build
build: $(patsubst %, build-%, $(TAGS))
sed 's/%%ALPINE_VOLUMES%%/$(VOLS)/' abuild.in >| abuild
+ chmod +x abuild
.PHONY: build-%
build-%:
sed 's/%%ALPINE_TAG%%/$*/' Dockerfile.in >| Dockerfile
- for v in $(VOLS) ; do docker volume create alpine-$*-$$v ; done
DOCKER_BUILDKIT=1 docker build $$DOCKER_FLAGS -t $(IMG):$* .
+ for v in $(VOLS) ; do docker volume create abuild-$*-$$v ; done
$(RM) Dockerfile
.PHONY: push
-push: build
+push:
docker push $(DOCKER_FLAGS) $(IMG)
.PHONY: clean
clean:
+ docker rmi -f $$(docker images -q $(IMG))
$(RM) Dockerfile
.PHONY: distclean
distclean: clean
docker rmi -f $$(docker images -q $(IMG))
+ docker rmi $$(docker volume ls --filter 'name=alpine-' -q)