Skip to content

Commit

Permalink
Bump to version 20.2.0-11344
Browse files Browse the repository at this point in the history
  • Loading branch information
gocd-ci-user committed Mar 18, 2020
1 parent 8d9f78f commit 9df2dc9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ ARG UID=1000
RUN \
apk --no-cache upgrade && \
apk add --no-cache curl && \
curl --fail --location --silent --show-error "https://download.gocd.org/binaries/20.1.0-11114/generic/go-server-20.1.0-11114.zip" > /tmp/go-server-20.1.0-11114.zip
RUN unzip /tmp/go-server-20.1.0-11114.zip -d /
RUN mv /go-server-20.1.0 /go-server && chown -R ${UID}:0 /go-server && chmod -R g=u /go-server
curl --fail --location --silent --show-error "https://download.gocd.org/binaries/20.2.0-11344/generic/go-server-20.2.0-11344.zip" > /tmp/go-server-20.2.0-11344.zip
RUN unzip /tmp/go-server-20.2.0-11344.zip -d /
RUN mv /go-server-20.2.0 /go-server && chown -R ${UID}:0 /go-server && chmod -R g=u /go-server

FROM alpine:3.9
FROM alpine:3.11
MAINTAINER ThoughtWorks, Inc. <[email protected]>

LABEL gocd.version="20.1.0" \
description="GoCD server based on alpine version 3.9" \
LABEL gocd.version="20.2.0" \
description="GoCD server based on alpine version 3.11" \
maintainer="ThoughtWorks, Inc. <[email protected]>" \
url="https://www.gocd.org" \
gocd.full.version="20.1.0-11114" \
gocd.git.sha="f2c1771e333ea92dae82cd78d2efa1310c1086f0"
gocd.full.version="20.2.0-11344" \
gocd.git.sha="0cb6660ad91a19a4064e6537374c896506add24a"

# the ports that go server runs on
EXPOSE 8153 8154
EXPOSE 8153

ADD https://github.com/krallin/tini/releases/download/v0.18.0/tini-static-amd64 /usr/local/sbin/tini

Expand Down Expand Up @@ -94,7 +94,7 @@ RUN \
apk del --purge .build-deps glibc-i18n && \
rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar.xz /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* && \
# end installing adoptopenjre && \
curl --fail --location --silent --show-error 'https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.1%2B9/OpenJDK13U-jre_x64_linux_hotspot_13.0.1_9.tar.gz' --output /tmp/jre.tar.gz && \
curl --fail --location --silent --show-error 'https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jre_x64_linux_hotspot_13.0.2_8.tar.gz' --output /tmp/jre.tar.gz && \
mkdir -p /gocd-jre && \
tar -xf /tmp/jre.tar.gz -C /gocd-jre --strip 1 && \
rm -rf /tmp/jre.tar.gz && \
Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Please make sure to log them at https://github.com/gocd/gocd.
Start the container with this:

```shell
docker run -d -p8153:8153 -p8154:8154 gocd/gocd-server:v20.1.0
docker run -d -p8153:8153 gocd/gocd-server:v20.2.0
```

This will expose container ports 8153(http) and 8154(https) onto your server.
You can now open `http:https://localhost:8153` and `https://localhost:8154`
This will expose container ports 8153(http) onto your server.
You can now open `http:https://localhost:8153`

# Available configuration options

Expand All @@ -26,7 +26,7 @@ artifacts, plugins, and logs into `/godata`. If you'd like to provide secure
credentials like SSH private keys among other things, you can mount `/home/go`

```shell
docker run -v /path/to/godata:/godata -v /path/to/home-dir:/home/go gocd/gocd-server:v20.1.0
docker run -v /path/to/godata:/godata -v /path/to/home-dir:/home/go gocd/gocd-server:v20.2.0
```

> **Note:** Ensure that `/path/to/home-dir` and `/path/to/godata` is accessible by the `go` user in container (`go` user - uid `1000`).
Expand All @@ -45,7 +45,7 @@ An example example would be `GOCD_PLUGIN_INSTALL_docker-elastic-agents=https://g
```shell
docker run \
-e GOCD_PLUGIN_INSTALL_docker-elastic-agents=https://github.com/gocd-contrib/docker-elastic-agents/releases/download/v0.8.0/docker-elastic-agents-0.8.0.jar \
gocd/gocd-server:v20.1.0
gocd/gocd-server:v20.2.0
```

To install multiple plugins, add several `-e` arguments as such:
Expand All @@ -54,7 +54,7 @@ To install multiple plugins, add several `-e` arguments as such:
docker run \
-e GOCD_PLUGIN_INSTALL_a-plugin=https://example.com/a-plugin.jar \
-e GOCD_PLUGIN_INSTALL_b-plugin=https://example.com/b-plugin.jar \
gocd/gocd-server:v20.1.0
gocd/gocd-server:v20.2.0
```

### Installing plugins using a custom entry-point script (see below)
Expand All @@ -76,7 +76,7 @@ Cloned repo **must** contain all files from `/godata/config` dir.
docker run \
-e CONFIG_GIT_REPO=https://gocd_user:<password_or_auth_token>/config.git \
-e CONFIG_GIT_BRANCH=branch_with_config \
gocd/gocd-server:v20.1.0
gocd/gocd-server:v20.2.0
```
*Checkouted content would overwrite files in `/godata/config/`*.

Expand All @@ -86,13 +86,13 @@ docker run \
To execute custom script(s) during the container boostrap, but **before** the GoCD server starts just add `-v /path/to/your/script.sh:/docker-entrypoint.d/your-script.sh` like so:

```shell
docker run -v /path/to/your/script.sh:/docker-entrypoint.d/your-script.sh ... gocd/gocd-server:v20.1.0
docker run -v /path/to/your/script.sh:/docker-entrypoint.d/your-script.sh ... gocd/gocd-server:v20.2.0
```

If you have several scripts in a directory that you'd like to execute:

```shell
docker run -v /path/to/script-dir:/docker-entrypoint.d ... gocd/gocd-server:v20.1.0
docker run -v /path/to/script-dir:/docker-entrypoint.d ... gocd/gocd-server:v20.2.0
```

> **Note:** Ensure that your scripts are executable `chmod a+x` — you can add as many scripts as you like, `bash` is available on the container. If your script uses other scripting language (perl, python), please ensure that the scripting language is installed in the container.
Expand All @@ -112,7 +112,7 @@ chown -R 1000 /path/to/godata/addons
JVM options can be tweaked using the environment variable `GOCD_SERVER_JVM_OPTS`.

```shell
docker run -e GOCD_SERVER_JVM_OPTS="-Xmx4096mb -Dfoo=bar" gocd/gocd-server:v20.1.0
docker run -e GOCD_SERVER_JVM_OPTS="-Xmx4096mb -Dfoo=bar" gocd/gocd-server:v20.2.0
```

# Under the hood
Expand All @@ -135,14 +135,13 @@ Once the GoCD server is up, we should be able to determine its ip address and th
The IP address and ports of the GoCD server in a docker container are important to know as they will be used by the GoCD agents to connect to it.
If you have started the container with
```shell
docker run --name server -it -p8153:8153 -p8154:8154 gocd/gocd-server:v20.1.0
docker run --name server -it -p8153:8153 gocd/gocd-server:v20.2.0
```

Then, the below commands will determine to GoCD server IP, server port and ssl port
```shell
docker inspect --format='{{(index (index .NetworkSettings.IPAddress))}}' server
docker inspect --format='{{(index (index .NetworkSettings.Ports "8153/tcp") 0).HostPort}}' server
docker inspect --format='{{(index (index .NetworkSettings.Ports "8154/tcp") 0).HostPort}}' server
```

# Running GoCD Containers as Non Root
Expand Down

0 comments on commit 9df2dc9

Please sign in to comment.