this image sleeps for 5 seconds to work in istio mesh to avoid failure if started before istio-proxy
119
jnlp-slave fails to connect to master when istio injection is enabled, this causes because jnlp tries to connect master before istio-proxy container becomes ready.
SEVERE: Failed to connect to http://jenkins-ci.default.svc.cluster.local:8080/tcpSlaveAgentListener/: Connection refused (Connection refused)
java.io.IOException: Failed to connect to http://jenkins-ci.default.svc.cluster.local:8080/tcpSlaveAgentListener/: Connection refused (Connection refused)
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:196)
at hudson.remoting.Engine.innerRun(Engine.java:523)
at hudson.remoting.Engine.run(Engine.java:474)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
This image has sleep 5 added to resolve this issue. Source Dockerfile is updated to add entrypoint.sh.
ARG version=4.3-1
FROM jenkins/slave:$version
ARG version
MAINTAINER Oleg Nenashev <[email protected]>
LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols" Vendor="Jenkins project" Version="$version"
ARG user=jenkins
USER root
COPY jenkins-agent /usr/local/bin/jenkins-agent
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/jenkins-agent /usr/local/bin/entrypoint.sh &&\
ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave
USER ${user}
ENTRYPOINT ["entrypoint.sh"]
entrypoint.sh:
#!/bin/bash
sleep 5 && jenkins-agent
Content type
Image
Digest
Size
234.9 MB
Last updated
over 6 years ago
docker pull deepakdeore2004/jnlp-slave:3.27-1