Public | Automated Build

Last pushed: 3 years ago
Short Description
Data-only container for gitolite-http.
Full Description


A Dockerfile for the data-only container for gitolite-http.


Run the container once to create the volumes needed by gitolite-http.

sudo docker run -d --name gitolite-httpdata hyzual/gitolite-httpdata

The container will stop immediately, which is normal. Now, you can run gitolite-http with the same volumes :

sudo docker run -d --name gitolite-http --p 80:80 -p 8022:22 --volumes-from gitolite-httpdata hyzual/gitolite-http

To use existing Gitolite repositories :

Run another container with bash as command, bind-mount your existing repositories and copy them to the volumes. You will also need to change the permissions in the volume since gitolite-http will run with the image's git user. Assuming you already ran gitolite with user git on the host :

# Bind-mount gitolite's data to /hostdata and the repositories to /hostrepo
sudo docker run -it --rm --volumes-from gitolitedata -v /home/git:/hostdata -v /home/git/repositories:/hostrepo hyzual/gitolitedata bash

# Copy from /hostdata to the /data volume, copy from /hostrepo to the /repositories volume and change permissions.
cp -R /hostdata/* /data \
    && cp -R /hostdata/.gitolite /data \
    && cp -R /hostdata/.gitolite.rc /data \
    && chown git:git -R /data \
    && cp -R /hostrepo/* /repositories \
    && chown git:git -R /repositories

# Check that the /data and /repositories have correct permissions, then exit from the container

Now follow the remaining instructions at gitolite-http to configure the .htpasswd file and grant apache access to the repositories.



Will contain gitolite's data and rc file.


Will contain all your gitolite-managed repositories.

Docker Pull Command
Source Repository