Gitblit image based on Java image from Docker Hub
Jacek Kowalski
2017-03-19 b8ba7bacb0c494a2a77c03a6fe9b97807bc31285
commit | author | age
6364a3 1 # Gitblit
JK 2
3 This is a Docker image of Gitblit (http://gitblit.com/)
b8ba7b 4 based on `openjdk:jre`
6364a3 5
JK 6 ## Usage
7
8 ```bash
9 docker run -d --name=gitblit \
10     -p 8080:8080 -p 8443:8443 \
11     -p 9418:9418 -p 29418:29418 \
12     jacekkow/gitblit
13 ```
14
15 Gitblit interface should be available at http://127.0.0.1:8080/
16 (user/password: `admin`/`admin`)
17
18 By default it uses Docker data volume for persistence.
19
20 You can update such installation by passing `--volumes-from` option
21 to `docker run`:
22
23 ```bash
24 docker pull jacekkow/gitblit
25 docker stop gitblit
26 docker rename gitblit gitblit-old
27 docker run -d --name=gitblit \
28     -p 8080:8080 -p 8443:8443 \
29     -p 9418:9418 -p 29418:29418 \
30     --volumes-from gitblit-old \
31     jacekkow/gitblit
32 docker rm -v gitblit-old
33 ```
34
35 ### Local storage
36
37 If you prefer to have direct access to container's data
38 from the host, you can use local storage instead of data volumes:
39
40 ```bash
41 docker run -d --name=gitblit \
42     -p 8080:8080 -p 8443:8443 \
43     -p 9418:9418 -p 29418:29418 \
44     -v /srv/gitblit:/opt/gitblit-data \
45     jacekkow/gitblit
46 ```
47
48 `gitblit-data` volume will be automatically populated
49 with default configuration if necessary.
50
51 File ownership is recursively changed to
52 `gitblit:gitblit` (`500:500`) on each start.
53
54 ### Configuration
55
56 You can configure the instance by editing files 
57 in directory /opt/gitblit-data inside the container
58 (or appropriate host dir if local storage is used).
0b2477 59
JK 60 By default the JVM is started with options `-server -Xmx1024m`.
61 You can override this default using `JAVA_OPTS` environment
62 variable:
63
64 ```bash
65 docker run -d --name=gitblit \
66     -p 8080:8080 -p 8443:8443 \
67     -p 9418:9418 -p 29418:29418 \
68     -e "JAVA_OPTS=-Xmx512m" \
69     jacekkow/gitblit
70 ```