Makefile: fix 'make shell'

This commit is contained in:
Danny Grove 2025-08-04 14:16:48 -07:00
parent 35778e160e
commit 89efffd2e9
Signed by: danny
GPG Key ID: E1F4160251DB4C2E
2 changed files with 9 additions and 2 deletions

View File

@ -47,8 +47,8 @@ update-tools:
./src/make/update.sh ./src/make/update.sh
.PHONY: shell .PHONY: shell
shell: out/tools-image.digest shell: build-tools load-tools
$(call run-container, -v $${PWD}:/home/user/stack:rw, $(shell cat $<), /bin/bash) $(call run-container, -v $${PWD}:/home/user/stack:rw, $(REGISTRY)/tools:latest, /bin/bash)
.PHONY: credentials .PHONY: credentials
credentials: \ credentials: \
@ -147,6 +147,9 @@ build-%: images/tools/Containerfile | out
cd images/tools cd images/tools
$(call build-container,$*,$(VERSION),$<,$(SOURCE_DATE_EPOCH),$(REVISION)) $(call build-container,$*,$(VERSION),$<,$(SOURCE_DATE_EPOCH),$(REVISION))
load-%: build-%
$(call import-container,$*)
out/tools-image.digest: out build-tools out/tools-image.digest: out build-tools
.PHONY: plan .PHONY: plan

View File

@ -48,3 +48,7 @@ define build-container
$(dir $3) \ $(dir $3) \
| tar -C out/image/$(1) -mx | tar -C out/image/$(1) -mx
endef endef
define import-container
tar -C out/image/$(1) -cf - . | docker load
endef