Gitblit image based on Java image from Docker Hub
Jacek Kowalski
2016-06-28 0b247732408f877aabca3adf77381fc37776f43a
Enable JVM options customization
2 files modified
18 ■■■■■ changed files
README.md 12 ●●●●● patch | view | raw | blame | history
run.sh 6 ●●●● patch | view | raw | blame | history
README.md
@@ -56,3 +56,15 @@
You can configure the instance by editing files 
in directory /opt/gitblit-data inside the container
(or appropriate host dir if local storage is used).
By default the JVM is started with options `-server -Xmx1024m`.
You can override this default using `JAVA_OPTS` environment
variable:
```bash
docker run -d --name=gitblit \
    -p 8080:8080 -p 8443:8443 \
    -p 9418:9418 -p 29418:29418 \
    -e "JAVA_OPTS=-Xmx512m" \
    jacekkow/gitblit
```
run.sh
@@ -4,6 +4,10 @@
    cp -Rf /opt/gitblit-data-initial/* /opt/gitblit-data/
fi
if [ -z "$JAVA_OPTS" ]; then
    JAVA_OPTS="-server -Xmx1024m"
fi
chown -Rf gitblit:gitblit /opt/gitblit-data
exec sudo -u gitblit java -server -Xmx1024M -Djava.awt.headless=true -jar /opt/gitblit/gitblit.jar --baseFolder /opt/gitblit-data
exec sudo -u gitblit java $JAVA_OPTS -Djava.awt.headless=true -jar /opt/gitblit/gitblit.jar --baseFolder /opt/gitblit-data