Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
piomin committed Feb 22, 2018
1 parent 5090878 commit 145ff26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM docker:18-dind
MAINTAINER Piotr Minkowski <piotr.minkowski@gmail.com>
ENV JENKINS_MASTER http://localhost:8080
ENV JENKINS_SLAVE_NAME dind-node
ENV JENKINS_SLAVE_SECRET ""
ENV JENKINS_HOME /home/jenkins
ENV JENKINS_REMOTING_VERSION 3.17
ENV DOCKER_HOST tcp://0.0.0.0:2375
Expand Down Expand Up @@ -29,4 +32,4 @@ COPY entrypoint.sh /usr/local/bin/entrypoint
VOLUME $JENKINS_HOME
WORKDIR $JENKINS_HOME
USER jenkins
ENTRYPOINT ["java", "-jar", "/usr/share/jenkins/slave.jar", "-jnlpUrl", "http://192.168.99.100:38080/computer/dind-node-1/slave-agent.jnlp", "-secret", "5664fe146104b89a1d2c78920fd9c5eebac3bd7344432e0668e366e2d3432d3e"]
ENTRYPOINT ["/usr/local/bin/entrypoint"]
7 changes: 4 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh
set -e
echo "starting dockerd..."
set -- sudo dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=vfs &
sudo dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=vfs &
echo "starting jnlp slave..."
exec java -jar /usr/share/jenkins/slave.jar \
-jnlpUrl http://192.168.99.100:38080/computer/dind-node-1/slave-agent.jnlp \
-secret bee075f8fd9033ec7d89d7bf08e106d6e2588d278efc99ad19c4fb931a29108c "$@"
-jnlpUrl $JENKINS_URL/computer/$JENKINS_SLAVE_NAME/slave-agent.jnlp \
-secret $JENKINS_SLAVE_SECRET

0 comments on commit 145ff26

Please sign in to comment.