From b9a4581d606e33f085c136a4906732222f58a1a2 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Wed, 6 Nov 2019 12:48:44 +0100 Subject: [PATCH] Pass in HOME env-var in container mode. To get ~/-paths to work as expected in contaier mode, env-var HOME must be the same outside the container as inside the docker-compose container, otherwise HOME inside the container points to /root which might not be what the user expects. Signed-off-by: Anton Lundin --- script/run/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/run/run.sh b/script/run/run.sh index f3456720f..21b837329 100755 --- a/script/run/run.sh +++ b/script/run/run.sh @@ -43,7 +43,7 @@ if [ -n "$compose_dir" ]; then VOLUMES="$VOLUMES -v $compose_dir:$compose_dir" fi if [ -n "$HOME" ]; then - VOLUMES="$VOLUMES -v $HOME:$HOME -v $HOME:/root" # mount $HOME in /root to share docker.config + VOLUMES="$VOLUMES -v $HOME:$HOME -e HOME" # Pass in HOME to share docker.config and allow ~/-relative paths to work. fi # Only allocate tty if we detect one