Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Commit

Permalink
Organize the docker images and simplify the build commands
Browse files Browse the repository at this point in the history
  • Loading branch information
zabil committed Sep 14, 2016
1 parent b54f9cc commit d51b147
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 287 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.out
phusion/agent/Dockerfile
phusion/server/Dockerfile
12 changes: 0 additions & 12 deletions Dockerfile.centos.gocd-agent

This file was deleted.

22 changes: 0 additions & 22 deletions Dockerfile.gocd-build-installer

This file was deleted.

34 changes: 0 additions & 34 deletions Dockerfile.gocd-dev.erb

This file was deleted.

17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
This is the repository which contains the Dockerfiles and supporting scripts for:

https://registry.hub.docker.com/u/gocd/gocd-dev/

https://registry.hub.docker.com/u/gocd/gocd-agent/

https://registry.hub.docker.com/u/gocd/gocd-server/

https://registry.hub.docker.com/u/gocd/gocd-build-installer/

Follow those URLs for more details about the actual images. For instructions to build the Docker images yourself, check
the first line of each Dockerfile.

## Version control system clients

To keep image size minimal the GoCD server image only contains the Git client. To add other clients create your own image using this as a base.

e.x. to add Subversion:
```
FROM gocd/gocd-server:<version>
RUN apk --no-cache add subversion
```


## Contributing

We encourage you to contribute to Go. For information on contributing to this project, please see our [contributor's guide](http://www.go.cd/contribute).
Expand All @@ -30,7 +15,7 @@ A lot of useful information like links to user documentation, design documentati
## License

```plain
Copyright 2015 ThoughtWorks, Inc.
Copyright 2016 ThoughtWorks, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.alpine-gocd-server → alpine/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build using: docker build --build-arg GO_VERSION=16.x.x-xxxx -f Dockerfile.alpine-gocd-server --tag=alpine-gocd-server .
# Build using: docker build --build-arg GO_VERSION=16.x.x-xxxx . --t alpine-gocd-server

FROM delitescere/jdk:latest
#16.5.0-3305
Expand Down Expand Up @@ -26,7 +26,7 @@ VOLUME ["/config", "/artifacts", "/logs"]
EXPOSE 8153 8154

# Dockerized startup script. Should work on more than Alpine, but YMMV.
COPY gocd-server/alpine-start.sh /start
COPY alpine-start.sh /start

CMD ["/start"]

Expand Down
File renamed without changes.
18 changes: 15 additions & 3 deletions Dockerfile.centos → centos/agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# docker build --rm -f Dockerfile.centos -t local/centos .
# docker build --build-arg GO_VERSION=16.x.x-xxxx --rm -t gocd-agent .
FROM centos:7
MAINTAINER "GoCD" <[email protected]>
ENV container docker

ARG GO_VERSION="16.8.0-3889"
ENV TINI_VERSION v0.9.0

RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
Expand All @@ -11,9 +14,18 @@ rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*; \
yum install -y java-1.8.0-openjdk-headless git;

VOLUME [ "/sys/fs/cgroup" ]

ENV TINI_VERSION v0.9.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]


ADD https://download.go.cd/experimental/binaries/$GO_VERSION/rpm/go-agent-$GO_VERSION.noarch.rpm /tmp/go-agent.rpm

WORKDIR /tmp
RUN yum install -y /tmp/go-agent.rpm; yum clean all; rm -f /etc/default/go-server

# Run your program under Tini
CMD PRODUCTION_MODE=N /usr/share/go-agent/agent.sh
81 changes: 0 additions & 81 deletions gocd-build-installer/go-build-installer.sh

This file was deleted.

12 changes: 0 additions & 12 deletions gocd-build-installer/go-compile.sh

This file was deleted.

12 changes: 0 additions & 12 deletions gocd-dev/go-agent-start.sh

This file was deleted.

39 changes: 0 additions & 39 deletions gocd-dev/go-server-start.sh

This file was deleted.

28 changes: 0 additions & 28 deletions gocd-server/go-common-scripts.sh

This file was deleted.

6 changes: 3 additions & 3 deletions Dockerfile.gocd-agent.erb → phusion/agent/Dockerfile.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% abort("Missing environment variable GO_VERSION") if ENV['GO_VERSION'].nil? %>
# Create docker file using : GO_VERSION=16.x.x-xxxx erb Dockerfile.gocd-agent.erb > Dockerfile.gocd-agent.out
# Build using : docker build -f Dockerfile.gocd-agent.out --tag=gocd-agent .
# Create docker file using : GO_VERSION=16.x.x-xxxx erb Dockerfile.erb > Dockerfile
# Build using : docker build . -t gocd-agent

FROM phusion/baseimage:0.9.18
MAINTAINER GoCD <go-cd-dev@googlegroups.com>
Expand All @@ -11,7 +11,7 @@ RUN apt-get upgrade -y
RUN apt-get install -y -q unzip openjdk-7-jre-headless git mercurial subversion

RUN mkdir /etc/service/go-agent
ADD gocd-agent/go-agent-start.sh /etc/service/go-agent/run
ADD go-agent-start.sh /etc/service/go-agent/run

ADD https://download.go.cd/binaries/<%= ENV['GO_VERSION'] %>/deb/go-agent_<%= ENV['GO_VERSION'] %>_all.deb /tmp/go-agent.deb

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions Dockerfile.gocd-server.erb → phusion/server/Dockerfile.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% abort("Missing environment variable GO_VERSION") if ENV['GO_VERSION'].nil? %>
# Create docker file using : GO_VERSION=16.x.x-xxxx erb Dockerfile.gocd-server.erb > Dockerfile.gocd-sever.out
# Build using : docker build -f Dockerfile.gocd-server.out --tag=gocd-server .
# Create docker file using : GO_VERSION=16.x.x-xxxx erb Dockerfile.erb > Dockerfile
# Build using : docker build . -t gocd-server

FROM phusion/baseimage:0.9.18
MAINTAINER GoCD <go-cd-dev@googlegroups.com>
Expand All @@ -11,8 +11,8 @@ RUN apt-get upgrade -y
RUN apt-get install -y -q unzip openjdk-7-jre-headless git mercurial subversion

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 go-common-scripts.sh /etc/service/go-server/go-common-scripts.sh
ADD go-server-start.sh /etc/service/go-server/run

ADD https://download.go.cd/binaries/<%= ENV['GO_VERSION'] %>/deb/go-server_<%= ENV['GO_VERSION'] %>_all.deb /tmp/go-server.deb

Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d51b147

Please sign in to comment.