Skip to content

Instantly share code, notes, and snippets.

@taikedz
Last active October 26, 2017 15:35
Show Gist options
  • Save taikedz/5dc8d412701da6837dec7d51de06deb1 to your computer and use it in GitHub Desktop.
Save taikedz/5dc8d412701da6837dec7d51de06deb1 to your computer and use it in GitHub Desktop.
Dockerfile for a go-cd server instance
FROM ubuntu:xenial
RUN apt-get update
RUN apt-get install -y vim git ca-certificates curl openjdk-8-jre
RUN apt-get install -y apt-transport-https
RUN echo "deb https://download.gocd.org /" > /etc/apt/sources.list.d/gocd.list
RUN curl https://download.gocd.org/GOCD-GPG-KEY.asc | apt-key add -
RUN apt-get update
RUN apt-get install go-server
RUN sed -r 's/DAEMON=.*/DAEMON=N/' -i /etc/default/go-server
RUN mv /etc/default/go-server /etc/go/go-server-config
RUN ln -s /etc/go/go-server-config /etc/default/go-server
EXPOSE 8153/tcp
EXPOSE 8154/tcp
VOLUME /var/lib/go-server
VOLUME /etc/go
CMD /usr/share/go-server/server.sh
# Now just run the following to get an instance
# docker run -d --name=gocd-test gocd
# Web interface is available on port 8053
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment