2016-06-27 03:40:11 +00:00
|
|
|
Provides a ready-to-use instance of [GitBlit](http://gitblit.com/).
|
2016-06-11 23:18:17 +00:00
|
|
|
|
|
|
|
## Basic usage
|
|
|
|
|
|
|
|
Start the GitBlit container using
|
|
|
|
|
2016-06-11 23:32:09 +00:00
|
|
|
docker run -d -p 80:80 -p 443:443 --name gitblit itzg/gitblit
|
2016-06-11 23:18:17 +00:00
|
|
|
|
2016-06-27 03:40:11 +00:00
|
|
|
Access its web interface at the mapped HTTP (80) or HTTPS (443) port of the
|
2016-06-11 23:18:17 +00:00
|
|
|
Docker host. Login with the default credentials __admin__ / __admin__ .
|
|
|
|
|
|
|
|
|
|
|
|
## Data volume
|
|
|
|
|
|
|
|
In order to allow for future upgrades, run the container with a volume mount of `/data`, such as:
|
2014-07-21 01:01:25 +00:00
|
|
|
|
2016-06-11 23:32:09 +00:00
|
|
|
-v /tmp/gitblit-data:/data
|
2014-07-21 01:01:25 +00:00
|
|
|
|
2016-06-11 23:18:17 +00:00
|
|
|
## Initial repository creation
|
|
|
|
|
2016-06-27 03:40:11 +00:00
|
|
|
As a convenience for cluster configuration management with git
|
|
|
|
(such as with [Spring Cloud Config](https://cloud.spring.io/spring-cloud-config/)),
|
2016-06-11 23:18:17 +00:00
|
|
|
you may specify the name of an initial repository to be owned by the 'admin' user.
|
|
|
|
This can be enabled by passing the name of that repository via the environment
|
|
|
|
variable `GITBLIT_INITIAL_REPO`, such as
|
|
|
|
|
|
|
|
-e GITBLIT_INITIAL_REPO=default
|
|
|
|
|
2016-06-27 03:40:11 +00:00
|
|
|
## Create repositories with content
|
|
|
|
|
|
|
|
In addition to the approach above, you can push repostories with existing
|
|
|
|
content by attaching them to sub-directories of `/repos`, such as
|
|
|
|
|
|
|
|
docker run -v $HOME/git/example:/repos/example ...
|
|
|
|
|
2016-06-11 23:18:17 +00:00
|
|
|
## Custom configuration
|
|
|
|
|
|
|
|
You can add or override any of the `*.properties` files for configuring GitBlit,
|
|
|
|
typically `gitblit.properties`, by placing those files in a volume attached at
|
|
|
|
`/config`, such as
|
|
|
|
|
2016-06-11 23:32:09 +00:00
|
|
|
-v $(pwd)/extra-config:/config
|
2016-06-11 23:18:17 +00:00
|
|
|
|
2016-06-27 03:40:11 +00:00
|
|
|
The property files in that configuration directory will be renamed with the
|
2016-06-11 23:18:17 +00:00
|
|
|
suffix `.applied` to avoid overwriting manually modified configuration on
|
|
|
|
the next container startup.
|