Creating jenkins master image through dockerfile

Hello Team ,

I am getting the below error while building the docker image of jenkins master

Feb 13, 2023 6:02:34 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://updates.jenkins.io:443: The target server failed to respond

Below is my Dockerfile

FROM jenkins/jenkins:2.376
USER root
RUN apt-get update && apt-get install -y lsb-release
RUN apt-get update && apt-get install -y docker-ce-cli
USER jenkins
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN jenkins-plugin-cli -f /usr/share/jenkins/plugins.txt
ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false
COPY jenkins-casc.yaml /usr/local/jenkins-casc.yaml
ENV CASC_JENKINS_CONFIG /usr/local/jenkins-casc.yaml
USER root

Dose anyone have any idea on how to resolve this issue
Help will be appreciated.

1 Like

Network issue. So you need to provide
Proxy maybe?

1 Like

Hello @prashantlahare16494 and welcome to this community.

It sometimes also happens to me without any proxy between my machine and the Jenkins update server.
Most of the times, the error is transient, so waiting a little and then retrying solves the issue.

We’re running an older version of Apache httpd on that server currently and sometimes it is unable to handle the load. The plugin installation manager tool (jenkins-plugin-cli) includes automatic retry when no response is received from the server. If the retries do not download the file, then the container build will fail because the jenkins-plugin-cli call will fail

1 Like