forked from gocd/gocd-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gocd-server
28 lines (21 loc) · 1.2 KB
/
Dockerfile.gocd-server
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
# Build using: docker build -f Dockerfile.gocd-server -t gocd-server .
FROM phusion/baseimage:0.9.16
MAINTAINER Aravind SV <arvind.sv@gmail.com>
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
RUN apt-get update && apt-get install -y -q unzip openjdk-7-jre-headless git
RUN mkdir /etc/service/go-server
ADD gocd-server/go-common-scripts.sh /etc/service/go-server/go-common-scripts.sh
ADD gocd-server/go-server-start.sh /etc/service/go-server/run
ADD http://download.go.cd/gocd-deb/go-server-15.1.0-1863.deb /tmp/go-server.deb
RUN ["groupadd", "-r", "go"]
RUN ["useradd", "-r", "-c", "Go User", "-g", "go", "-d", "/var/go", "-m", "-s", "/bin/bash", "go"]
RUN ["mkdir", "-p", "/var/lib/go-server/addons", "/var/log/go-server", "/etc/go", "/go-addons"]
RUN ["touch", "/etc/go/postgresqldb.properties"]
RUN ["chown", "-R", "go:go", "/var/lib/go-server", "/var/log/go-server", "/etc/go", "/go-addons"]
VOLUME ["/var/lib/go-server", "/var/log/go-server", "/etc/go", "/go-addons"]
WORKDIR /tmp
RUN dpkg -i --debug=10 /tmp/go-server.deb
RUN sed -i -e 's/DAEMON=Y/DAEMON=N/' /etc/default/go-server
EXPOSE 8153 8154
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
CMD ["/sbin/my_init"]