From d69a94ffddfdd99a1b2f7cc67a607e6fdd531281 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Wed, 16 Nov 2022 16:19:27 +0100 Subject: [PATCH] Add .shell target for interactive make Signed-off-by: Evan Lezar --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 78a5692..edb90f6 100644 --- a/Makefile +++ b/Makefile @@ -96,3 +96,15 @@ $(DOCKER_TARGETS): docker-%: .build-image --user $$(id -u):$$(id -g) \ $(BUILDIMAGE) \ make $(*) + +# Start an interactive shell using the development image. +PHONY: .shell +.shell: + $(DOCKER) run \ + --rm \ + -ti \ + -e GOCACHE=/tmp/.cache \ + -v $(PWD):$(PWD) \ + -w $(PWD) \ + --user $$(id -u):$$(id -g) \ + $(BUILDIMAGE)