From 3bb91fa2b063f394f9b4f47f3cbbed11834f4764 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Mon, 6 Dec 2021 11:47:53 +0100 Subject: [PATCH] docker: add shell command to entrypoint --- Makefile | 3 --- docker/entrypoint.sh | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b940eb6..c6708b2 100755 --- a/Makefile +++ b/Makefile @@ -233,6 +233,3 @@ docker-push: docker-pull: env docker pull glenux/teaching-boilerplate:latest - -shell: - $(SHELL) -c "exec $${SHELL}" diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 1d39912..381d182 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -21,4 +21,9 @@ if [ -d "_build" ]; then chown -R "$EXT_UID:$EXT_GID" _build fi -exec gosu "$EXT_UID:$EXT_GID" make "$@" +if [ "$1" = "shell" ]; then + exec bash +else + exec gosu "$EXT_UID:$EXT_GID" make "$@" +fi +