From 2084e85217c8acc54e997338432efefdd6e15487 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 14 Feb 2019 19:06:11 +0100 Subject: [PATCH] Wrap rootfs builder in Archlinux Signed-off-by: Knut Ahlers --- Makefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 69bc837..9bd012a 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,16 @@ jenkins: docker-image-test_base-devel jenkins: docker-push_base-devel rootfs_minimal: - bash mkroots.sh + docker run --rm -ti -v "$(CURDIR):$(CURDIR)" -w "$(CURDIR)" \ + --privileged --tmpfs=/tmp:exec --tmpfs=/run/shm \ + $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):latest \ + sh -c 'pacman -Sy --noconfirm devtools tar && bash mkroots.sh' rootfs_%: - bash mkroots.sh $* + docker run --rm -ti -v "$(CURDIR):$(CURDIR)" -w "$(CURDIR)" \ + --privileged --tmpfs=/tmp:exec --tmpfs=/run/shm \ + $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):latest \ + sh -c 'pacman -Sy --noconfirm devtools tar && bash mkroots.sh $*' docker-image_minimal: rootfs_minimal docker build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):latest . @@ -40,4 +46,10 @@ docker-image-test_%: docker-push_%: docker push $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$* +# Special build target to locally build the first minimal image +seed: + bash mkroots.sh + docker build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):latest . + docker push $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$* + .PHONY: rootfs docker-image docker-image-test ci-test docker-push