Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.
#!/bin/bash
docker pull harpo/git
This requires a directory to be available that includes your git credentials (if you intend to push or use private repos).
#!/bin/bash
mkdir -p ~/ctx/git/.ssh
To launch git in an isolated context run:
#!/bin/bash
docker run --rm -it --security-opt=no-new-privileges -e MYUID=$(id -u) -e MYGID=$(id -g) -v $PWD:/ctx -v $HOME/ctx/git:/home/isolated harpo/git "$@"
This configuration can only be used from the root of a git project. Running git from inside a subdirectory of a project will not provide the container with the required .git file.
Content type
Image
Digest
Size
12.3 MB
Last updated
over 7 years ago
docker pull harpo/git