From 6c19aed9aad43fe57c0de3583e3603c92eae493a 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 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 8e592f8..ef111d6 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,6 @@ EXTRA_ARGS := .DEFAULT_GOAL := .PHONY: default default: \ - toolchain \ tools \ apply @@ -28,13 +27,16 @@ default: \ clean: rm -rf $(CACHE_DIR) +out: + mkdir out + .PHONY: update-tools update-tools: ./src/make/update.sh .PHONY: shell shell: out/tools-image.digest - $(call run-container, -v ./secrets:/secrets, $(shell cat $<), bin/sh) + $(call run-container, -v $${PWD}:/home/user/stack:rw, $(shell cat $<), /bin/bash) .PHONY: credentials credentials: \ @@ -137,11 +139,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