* Initial controlled revision of gitblit docker

* Gitblit 1.6.0
This commit is contained in:
Geoff Bourne 2014-07-21 01:01:25 +00:00
parent 8168c62bdd
commit 7fb406c2bb
3 changed files with 45 additions and 0 deletions

30
gitblit/Dockerfile Normal file
View file

@ -0,0 +1,30 @@
FROM itzg/ubuntu-openjdk-7
MAINTAINER itzg
ENV APT_GET_UPDATE 2014-07-19
RUN apt-get update
RUN apt-get -y install wget tar
ENV GITBLIT_VERSION 1.6.0
RUN wget -O /tmp/gitblit.tgz http://dl.bintray.com/gitblit/releases/gitblit-$GITBLIT_VERSION.tar.gz
RUN mkdir /opt/gitblit
RUN tar -C /opt/gitblit -xvf /tmp/gitblit.tgz
RUN rm /tmp/gitblit.tgz
VOLUME ["/data"]
ADD start.sh /start
WORKDIR /opt/gitblit
ENV GITBLIT_PATH /opt/gitblit
ENV GITBLIT_HTTPS_PORT 443
ENV GITBLIT_HTTP_PORT 80
ENV GITBLIT_BASE_FOLDER /data
EXPOSE 80 443
CMD ["/start"]

5
gitblit/README.md Normal file
View file

@ -0,0 +1,5 @@
Provides a ready-to-use instance of [GitBlit](http://gitblit.com/). In order to allow for
future upgrades run the container with a volume mount of `/data`, such as:
docker run -d -p 80:80 p 443:443 -v /tmp/gitblit-data:/data --name gitblit itzg/gitblit

10
gitblit/start.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
contents=`ls $GITBLIT_BASE_FOLDER|wc -l`
if [ $contents = "0" ]; then
cp -r $GITBLIT_PATH/data/* $GITBLIT_BASE_FOLDER
fi
$JAVA_HOME/bin/java -jar $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT --baseFolder $GITBLIT_BASE_FOLDER