diff --git a/Makefile b/Makefile index a33fe85..f01f347 100644 --- a/Makefile +++ b/Makefile @@ -47,8 +47,8 @@ update-tools: ./src/make/update.sh .PHONY: shell -shell: out/tools-image.digest - $(call run-container, -v $${PWD}:/home/user/stack:rw, $(shell cat $<), /bin/bash) +shell: build-tools load-tools + $(call run-container, -v $${PWD}:/home/user/stack:rw, $(REGISTRY)/tools:latest, /bin/bash) .PHONY: credentials credentials: \ @@ -147,6 +147,9 @@ build-%: images/tools/Containerfile | out cd images/tools $(call build-container,$*,$(VERSION),$<,$(SOURCE_DATE_EPOCH),$(REVISION)) +load-%: build-% + $(call import-container,$*) + out/tools-image.digest: out build-tools .PHONY: plan diff --git a/src/make/macros.mk b/src/make/macros.mk index 68036cf..1479e72 100644 --- a/src/make/macros.mk +++ b/src/make/macros.mk @@ -48,3 +48,7 @@ define build-container $(dir $3) \ | tar -C out/image/$(1) -mx endef + +define import-container + tar -C out/image/$(1) -cf - . | docker load +endef