Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33232

Not working in internal network.

XMLWordPrintable

      The following error happened in my environment which cannot connect to index.docker.io.

      $ docker run --rm --entrypoint /bin/true alpine:3.2
      Unable to find image 'alpine:3.2' locally
      Pulling repository docker.io/library/alpine
      docker: Error while pulling image: Get https://index.docker.io/v1/repositories/library/alpine/images: dial tcp 54.152.78.181:443: getsockopt: connection refused.
      See 'docker run --help'.
      FATAL: Failed to run docker image docker-registry.dev.cybozu.xyz/kintone/jenkins-build-base
      java.lang.RuntimeException: Failed to run docker image docker-registry.dev.cybozu.xyz/kintone/jenkins-build-base
      	at com.cloudbees.jenkins.plugins.docker_build_env.Docker.getDocker0Ip(Docker.java:249)
      	at com.cloudbees.jenkins.plugins.docker_build_env.Docker.runDetached(Docker.java:178)
      	at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.startBuildContainer(DockerBuildWrapper.java:202)
      	at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:175)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:156)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      	at hudson.model.Run.execute(Run.java:1738)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      

      It seems that the following pull request is cause of this bug.

      https://github.com/jenkinsci/docker-custom-build-environment-plugin/pull/36

      The plugin was modified to use external image "alpine:3.2". However, this change is backward incompatible for environments in internal network with private docker registry.

      It is internal specification that the plugin uses the image, though building "alpine:3.2" image in a build environment can be a workaround. I think there should be a config option to specify the image for "/sbin/ip".

            jonhermansen Jon Hermansen
            miyajan Miyata Jumpei
            Votes:
            10 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: