Public Repository

Last pushed: 2 years ago
Short Description
Git server based on Gitolite3 and cgit
Full Description


Dockerized gitolite, cgit and Apache to host massive Git repositories. The container is expected to mount host directory to store repositories, config and logs. The volume name in the container is /var/lib/gitolite3.

The image is based centos7. It runs a streamlined apache configuration on non-priviledged 8080 port. The gitolite-admin is accessible via HTTP. For production use, a reverse proxy such as nginx should be placed in front of the dockerized gitolite to handle HTTPS.

On first launch, the container creates gitolite-admin and testing repository on the host directory. And create the default gitolite admin account 'admin' with password same as login name. New user can be maintained by changing the file 'git_passwd' on the host directory mount on '/var/lib/gitolite3'.

Please refer to for instructions to build the image and run the container.


Before you can run this image, you need setup a directory on host which is owned by specialized user 'git' with UID 888. Here is the command to create such directory:

# create user/group to run docker registry
getent group ${os_group} > /dev/null        \
  || sudo /usr/sbin/groupadd -g 888         \
                             -r ${os_group} \
                             2>/dev/null    \
  || :
getent passwd ${os_user} > /dev/null                \
  || sudo /usr/sbin/useradd -c "Owner of Git repos" \
                       -o                           \
                       -u 888                       \
                       -g ${os_group}               \
                       -s /bin/bash                 \
                       -r                           \
                       -d /var/lib/gitolite3        \
                       ${os_user} 2>/dev/null       \
  || :
# setup docker image storage diretories
sudo mkdir -p /var/lib/gitolite3
sudo chmod 755 /var/lib/gitolite3
sudo chown 888:888 /var/lib/gitolite3

You may replace '/var/lib/gitolite3' with any other directory you see fit.

Then you run the container like:

docker run                                   \
    -u git                                   \
    -p <HOST>:<PORT>:8080                    \
    -v /var/lib/gitolite3:/var/lib/gitolite3 \
Docker Pull Command