Skip to content

Commit

Permalink
Fix git inside docker
Browse files Browse the repository at this point in the history
  • Loading branch information
doshitan committed Dec 31, 2024
1 parent 849655f commit 7388e45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/docker-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ esac
# permission issues with mounted locations from the host file system
docker_flags+=(--user "$(id -u):$(id -g)")

# connect the host git config if present, for better chance committing with work
# inside the container (theoretically someone may not have their name/email
# configured even if the config file exists)
if [[ -e "$HOME/.gitconfig" ]]; then
docker_flags+=("-v=$HOME/.gitconfig:/.gitconfig")
fi

# figure out what location to mount for logs
HOST_LOG_DIR=${HOST_LOG_DIR:-}

Expand Down

0 comments on commit 7388e45

Please sign in to comment.