forked from ggershoni/gitblit-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (41 loc) · 1.83 KB
/
Dockerfile
File metadata and controls
51 lines (41 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Basics
#
from ubuntu:latest
maintainer James Moger <james.moger@gitblit.com>
run apt-get update
run apt-get install -q -y git-core redis-server
# Install Java 8
run DEBIAN_FRONTEND=noninteractive apt-get install -q -y software-properties-common
run DEBIAN_FRONTEND=noninteractive apt-get install -q -y python-software-properties
run DEBIAN_FRONTEND=noninteractive apt-add-repository ppa:webupd8team/java -y
run apt-get update
run echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
run DEBIAN_FRONTEND=noninteractive apt-get install oracle-java8-installer -y
# Install Gitblit
run apt-get install -q -y curl
run curl -Lks http://dl.bintray.com/gitblit/releases/gitblit-1.8.0.tar.gz -o /root/gitblit.tar.gz
run mkdir -p /opt/gitblit-tmp
run tar zxf /root/gitblit.tar.gz -C /opt/gitblit-tmp
run mv /opt/gitblit-tmp/gitblit-1.8.0 /opt/gitblit
run rm -rf /opt/gitblit-tmp
run rm -f /root/gitblit.tar.gz
# Move the data files to a separate directory
run mkdir -p /opt/gitblit-data
run mv /opt/gitblit/data/* /opt/gitblit-data
VOLUME /opt/gitblit-data
# Adjust the default Gitblit settings to bind to 80, 443, 9418, 29418, and allow RPC administration.
#
# Note: we are writing to a different file here because sed doesn't like to the same file it
# is streaming. This is why the original properties file was renamed earlier.
run echo "server.httpPort=80" >> /opt/gitblit-data/gitblit.properties
#run echo "web.enableRpcManagement=true" >> /opt/gitblit-data/gitblit.properties
#run echo "web.enableRpcAdministration=true" >> /opt/gitblit-data/gitblit.properties
# Setup the Docker container environment and run Gitblit
expose 80
expose 443
#expose 9418
expose 29418
WORKDIR /opt/gitblit
ADD entrypoint.sh /usr/local/bin/
ADD declare_properties_dictionary.sh /usr/local/bin/
ENTRYPOINT /usr/local/bin/entrypoint.sh