From 44ba564dfd1118b3140d8f8c1877ec35d0ad902a Mon Sep 17 00:00:00 2001 From: Danny Grove Date: Mon, 14 Jul 2025 23:19:55 -0700 Subject: [PATCH] Pass in gpg agent and socket to user, add stack repo to container --- Makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 58454a5..f96a616 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,6 @@ EXTRA_ARGS := .DEFAULT_GOAL := .PHONY: default default: \ - toolchain \ tools \ apply @@ -26,13 +25,16 @@ default: \ clean: rm -rf $(CACHE_DIR) +out: + mkdir out + .PHONY: update-tools update-tools: ./src/make/update.sh .PHONY: shell -shell: $(OUT_DIGEST) - $(call run-container, -v ./secrets:/secrets, $(shell cat $<), bin/sh) +shell: out/tools-image.digest + $(call run-container, -v $${PWD}:/home/user/stack:rw, $(shell cat $<), /bin/bash) .PHONY: credentials credentials: \ @@ -131,11 +133,12 @@ GPG_TTY ?= $(shell tty) define run-container docker run -it $(1) \ - -e GPG_TTY="$(GPG_TTY)" \ - -v $(shell gpgconf --list-dirs agent-socket):/root/.gnupg/S.gpg-agent:ro \ - -v $(shell gpgconf --list-dirs homedir):/root/.gnupg:rw \ - $(2) \ - $(3) + -v $$PWD/.bashrc:/home/user/.bashrc:ro \ + -v $(shell gpgconf --list-dirs socketdir)/:/run/user/1000/gnupg/:ro \ + -v $(shell gpgconf --list-dirs homedir):/home/user/.gnupg:rw \ + -e SSH_AUTH_SOCK=/run/user/1000/gnupg/$(shell basename $(shell gpgconf --list-dirs agent-ssh-socket)) \ + --entrypoint $(3) \ + $(2) endef .PHONY: plan