commit | author | age
|
eef80e
|
1 |
FROM openjdk:8-jre |
380b73
|
2 |
MAINTAINER Jacek Kowalski <Jacek@jacekk.info> |
JK |
3 |
|
06eedb
|
4 |
ENV GITBLIT_VERSION 1.9.1 |
380b73
|
5 |
|
JK |
6 |
RUN apt-get update \ |
|
7 |
&& apt-get dist-upgrade -y \ |
|
8 |
&& apt-get install -y git-core sudo wget \ |
f38cfb
|
9 |
&& apt-get clean \ |
JK |
10 |
&& rm -Rf /var/lib/apt/lists/* |
380b73
|
11 |
|
JK |
12 |
# Install Gitblit |
|
13 |
|
|
14 |
WORKDIR /opt |
ce9466
|
15 |
RUN wget -O /tmp/gitblit.tar.gz "https://github.com/gitblit/gitblit/releases/download/v${GITBLIT_VERSION}/gitblit-${GITBLIT_VERSION}.tar.gz" \ |
380b73
|
16 |
&& tar xzf /tmp/gitblit.tar.gz \ |
JK |
17 |
&& rm -f /tmp/gitblit.tar.gz \ |
|
18 |
&& ln -s gitblit-${GITBLIT_VERSION} gitblit \ |
|
19 |
&& mv gitblit/data gitblit-data-initial \ |
9ec6df
|
20 |
&& mkdir gitblit-data \ |
JK |
21 |
&& groupadd -r -g 500 gitblit \ |
380b73
|
22 |
&& useradd -r -d /opt/gitblit-data -u 500 -g 500 gitblit \ |
JK |
23 |
&& chown -Rf gitblit:gitblit /opt/gitblit-* |
|
24 |
|
|
25 |
# Adjust the default Gitblit settings to bind to 8080, 8443, 9418, 29418, and allow RPC administration. |
|
26 |
|
|
27 |
RUN echo "server.httpPort=8080" >> gitblit-data-initial/gitblit.properties \ |
|
28 |
&& echo "server.httpsPort=8443" >> gitblit-data-initial/gitblit.properties \ |
|
29 |
&& echo "web.enableRpcManagement=true" >> gitblit-data-initial/gitblit.properties \ |
|
30 |
&& echo "web.enableRpcAdministration=true" >> gitblit-data-initial/gitblit.properties |
|
31 |
|
|
32 |
# Setup the Docker container environment and run Gitblit |
|
33 |
|
|
34 |
VOLUME /opt/gitblit-data |
|
35 |
EXPOSE 8080 8443 9418 29418 |
|
36 |
|
|
37 |
WORKDIR /opt/gitblit |
|
38 |
COPY run.sh /run.sh |
|
39 |
CMD /run.sh |