aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Mortier <mort@cantab.net>2019-03-26 15:11:34 +0000
committerRichard Mortier <mort@cantab.net>2019-03-26 15:11:34 +0000
commit7fe811a6429678d29c4396063cfd750ee4eed653 (patch)
tree9737c29390833f603948ad333d8724f5d27f8e7e
parent16b84af6b81512944b7b731dfbcde6f2ce60a881 (diff)
downloaddocker-abuild-7fe811a6429678d29c4396063cfd750ee4eed653.tar.bz2
docker-abuild-7fe811a6429678d29c4396063cfd750ee4eed653.tar.xz
make: include `/home/builder/packages` as a cacheable directory
Signed-off-by: Richard Mortier <mort@cantab.net>
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index fd0c9a0..e73fa34 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
.DEFAULT: build
IMG = mor1/abuild
-VOLS = bin etc lib sbin usr var
+VOLS = bin etc lib sbin usr var home/builder/packages
# BRANCHES := $(shell \
# curl -s https://api.github.com/repos/alpinelinux/aports/branches \
# | jq -r '.[].name' \
@@ -10,18 +10,19 @@ VOLS = bin etc lib sbin usr var
# curl -s https://registry.hub.docker.com/v1/repositories/alpine/tags \
# | jq -r '.[].name' \
# )
+## let's just manually specify some tags for now
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
+ sed 's!%%ALPINE_VOLUMES%%!$(VOLS)!' abuild.in >| abuild
chmod +x abuild
.PHONY: build-%
build-%:
sed 's/%%ALPINE_TAG%%/$*/' Dockerfile.in >| Dockerfile
DOCKER_BUILDKIT=1 docker build $$DOCKER_FLAGS -t $(IMG):$* .
- for v in $(VOLS) ; do docker volume create abuild-$*-$$v ; done
+ for v in $(VOLS) ; do docker volume create abuild-$*-$${v//\//_} ; done
$(RM) Dockerfile
.PHONY: push