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 :

Volumes

/data/

/data/admin.pub should contain the admin's public key used to access gitolite through ssh. If you don't provide it using the volume, a new rsa key will be generated with that name (along with the private key at data/admin).

/data/.htpasswd should contain a list of usernames / passwords used to access gitolite through http. The usernames should match existing users of gitolite (i.e. with a public key).

The container will create a symlink from /data/repositories/ to the /repositories/ volume when started and Gitolite will create a /data/projects.list file.

/repositories/

/repositories will contain the git repositories managed by Gitolite. If you don't provide them using the volume, two repositories will be created (as with normal Gitolite installation) :

/repositories/gitolite-admin.git/ : the Gitolite administration repository. Use it to add SSH access by providing public keys for people in the keys/ repository. You can also create new repositories or add read or write access to people using their key's name. See the Gitolite Documentation for further information on how to administrate git repositories using Gitolite.

/repositories/testing.git/ : a test repository. Use it to test access to Gitolite with HTTP or SSH by cloning it. It's normal if it is empty.

Ports

22

Access Gitolite through SSH using the standard SSH port

80

Access Gitolite through HTTP using the standard HTTP port

Credits

Gitolite's installation steps are heavily borrowed from aostanin's Gitolite, so thanks to him ! Check out his images !