2016-02-24 10:24:26 +01:00
|
|
|
# Docker image for Gitolite
|
|
|
|
|
|
|
|
This image allows you to run a git server in a container with OpenSSH and [Gitolite](https://github.com/sitaramc/gitolite#readme).
|
|
|
|
|
|
|
|
Based on Alpine Linux.
|
|
|
|
|
2025-01-05 18:33:14 +01:00
|
|
|
**Fork of [https://github.com/jgiannuzzi/docker-gitolite](https://github.com/jgiannuzzi/docker-gitolite). with updated Alpine Version**
|
|
|
|
|
2016-02-24 15:11:42 +01:00
|
|
|
## Quick setup
|
2016-02-24 10:24:26 +01:00
|
|
|
|
2016-02-24 15:11:42 +01:00
|
|
|
Create volumes for your SSH server host keys and for your Gitolite config and repositories
|
2016-02-24 10:24:26 +01:00
|
|
|
|
2025-01-05 18:33:14 +01:00
|
|
|
```sh
|
|
|
|
docker volume create --name gitolite-sshkeys
|
|
|
|
docker volume create --name gitolite-git
|
|
|
|
```
|
2016-02-24 10:24:26 +01:00
|
|
|
|
|
|
|
Setup Gitolite with yourself as the administrator:
|
|
|
|
|
2025-01-05 18:33:14 +01:00
|
|
|
```sh
|
|
|
|
docker run --rm -e SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" -e SSH_KEY_NAME="$(whoami)" -v gitolite-sshkeys:/etc/ssh/keys -v gitolite-git:/var/lib/git jgiannuzzi/gitolite true
|
|
|
|
```
|
2016-02-24 10:24:26 +01:00
|
|
|
|
|
|
|
Finally run your Gitolite container in the background:
|
|
|
|
|
2025-01-05 18:33:14 +01:00
|
|
|
```sh
|
|
|
|
docker run -d --name gitolite -p 22:22 -v gitolite-sshkeys:/etc/ssh/keys -v gitolite-git:/var/lib/git jgiannuzzi/gitolite
|
|
|
|
```
|
2016-02-24 10:24:26 +01:00
|
|
|
|
|
|
|
You can then add users and repos by following the [official guide](https://github.com/sitaramc/gitolite#adding-users-and-repos).
|
2025-01-05 18:33:14 +01:00
|
|
|
|