Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description

This image is strongly based on the one you can find at

The idea here is to enable UKM and other gitolite commands, that's all. All the credits goes to miracle2k.

gitolite on docker

Runs an SSH server, serving gitolite as the git@ user.

On the first start, it will run "gitolite setup" with a starting ssh key
you provided, or you can bootstrap with an existing gitolite-admin repository.

On subsequent starts, will run "gitolite setup" everytime to integrate any
outside changes.


New installation:

docker run -e SSH_KEY="$(cat ~/.ssh/" elsdoerfer/gitolite

Use an existing gitolite installation:

docker run -v /var/vcroot/git:/home/git/repositories elsdoerfer/gitolite

Environment variables:


SSH public key for initial access to the gitolite-admin repository. If you
have an existing gitolite-admin repository, you may skip this.

LOCAL_CODE (example value: $ENV{HOME}/local)

These will be inserted into gitolite.rc.


Hostnames (only a single one is supported currently) to add to known_hosts, i.e.

Directories you could bind mount

The actual git repositories will be stored here.


If your gitolite install needs to mirror (that is, execute git push itself), the
image can help you:

  • The git user will have a ssh key generated for itself. Access the public key using
    docker cp CID:/home/git/.ssh/ ..

    Note that if you keep recreating the container, rather than restarting, a new key
    will be generated. You can bind mount the /home/git/.ssh directory to
    remedy this.

  • Use the TRUST_HOSTS environment variable to prepare the ./known_hosts file.

Further customization

If you need to use things like custom hooks, you have different options:

  • Point the LOCAL_CODE variable to something like "$ENV{HOME}/.gitolite/local", use the gitolite-admin repo to provide the data.
  • You could bind mount files into the container (xxx: how to provide certain files (gitolite.rc) before setup runs?)
  • Derive a custom Docker image, ADD the files (xxx: how to provide certain files (gitolite.rc) before setup runs?)
  • Manually interact with a container, but lose it disposible nature.
Docker Pull Command
Source Repository