git server running openssh, complete with git installed.
126
This container serves as a makeshift git repository (with no frontend).
It mounts /srv/git as a volume by default. This is the location of all remote git repositories.
The exec user is root, but SSH access for the root account has been disabled. You'll need to use the git user for this.
You can use the environment variable LOCAL_USER_ID to specify the id of the user who owns the authorized_keys file located on the host machine. This means that you can inject your own authorized_keys file so you can use ssh key access.
You need to mount in your own authorized_keys file at /home/git/.ssh/authorized_keys: this container ships with no password access over SSH.
Also, to create remote repositories, you'll have to exec (or SSH) in to the container as the git user, create the directory and then run git init --bare inside it. As long as you run this as the git user and your authorized_keys file has been inserted, you should have no problems using this server.
I would absolutely not recommend using this image in production, I haven't done any hardening or CVE evaluation. I only use this image for personal use to keep local backups of my repositories at home and across my virtual estate.
Content type
Image
Digest
Size
121.9 MB
Last updated
over 8 years ago
docker pull twistedvines/gitserver:0.1.0