forked from gocd/gocd-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.gocd-server
29 lines (22 loc) · 1.42 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
29
# Build using: docker build -f Dockerfile.gocd-server -t gocd-server .
FROM phusion/baseimage:0.9.16
MAINTAINER Aravind SV <[email protected]>
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
# install nodejs, update-alternatives is needed on ubuntu to enable command 'node'
RUN curl --silent --location https://deb.nodesource.com/setup_4.x | bash - && apt-get install --yes nodejs && update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
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.2.0-2248.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 ["chown", "-R", "go:go", "/var/lib/go-server", "/var/log/go-server", "/etc/go", "/go-addons", "/var/go"]
VOLUME ["/var/lib/go-server", "/var/log/go-server", "/etc/go", "/go-addons", "/var/go"]
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"]