Skip to content

Commit

Permalink
Merge pull request #1 from bryanlatten/feature-docker-version
Browse files Browse the repository at this point in the history
Dockerfile: updating dind engine to 19.03
  • Loading branch information
bryanlatten authored Aug 6, 2019
2 parents d0e0b3e + 8e88266 commit fa2d269
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker:17.12.1-dind
FROM docker:19.03.1-dind

MAINTAINER Mesosphere Support <support+jenkins-dind@mesosphere.com>

Expand All @@ -16,7 +16,8 @@ ENV ALPINE_EDGE_COMMUNITY_REPO=http://dl-cdn.alpinelinux.org/alpine/edge/communi
LC_ALL=en_US.UTF-8 \
SSH_KNOWN_HOSTS=github.com

ENV PATH=${PATH}:${JAVA_HOME}/bin
ENV PATH=${PATH}:${JAVA_HOME}/bin \
DOCKER_ENGINE_LOGS=false

# Please keep each package list in alphabetical order
RUN apk --update add \
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@ For full documentation on how to use this Docker image, please refer to
Try it out locally by running the following command:

```bash
docker run --privileged mesosphere/jenkins-dind:0.5.0-alpine \
docker run --privileged bryanlatten/jenkins-dind:0.7.0-alpine \
wrapper.sh "java -version && docker run hello-world"
```

- Use `DOCKER_ENGINE_LOGS` to control visibility of Docker's detailed daemon output


### Jenkins
You'll need to configure the Mesos plugin on your Jenkins master to use this
image. You'll probably also want to give it a special slave label, so that you
don't unnecessarily run builds using the dind image. A relevant snippet of the
Mesos plugin within the Jenkins master's `config.xml` follows:



```xml
<org.jenkinsci.plugins.mesos.MesosSlaveInfo>
<slaveCpus>0.1</slaveCpus>
Expand Down
10 changes: 9 additions & 1 deletion wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@
set -e

echo "==> Launching the Docker daemon..."
dind dockerd --storage-driver=overlay $DOCKER_EXTRA_OPTS &

if [ "$DOCKER_ENGINE_LOGS" = true ]; then
dind dockerd --storage-driver=overlay $DOCKER_EXTRA_OPTS &
else
dind dockerd --storage-driver=overlay $DOCKER_EXTRA_OPTS 2>1 &
fi

while(! docker info > /dev/null 2>&1); do
echo "==> Waiting for the Docker daemon to come online..."
sleep 1
done
echo "==> Docker Daemon is up and running!"
docker version
echo "==> Launcher complete"
echo ""

/bin/sh -c "$@"

0 comments on commit fa2d269

Please sign in to comment.