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

Support using docker within dockerised pipelines

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • docker-plugin, pipeline
    • None

      We are encouraging our developers to use the new declarative pipeline syntax with docker agents to fully isolate their builds and give them control over the environment. However, when said builds in turn produce docker images (such as via the docker-maven-plugin) they do not work with this approach, giving an error along the lines of

      [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.23.0:build (default-cli) on project my-project: Execution default-cli of goal io.fabric8:docker-maven-plugin:0.23.0:build failed: No <dockerHost> given, no DOCKER_HOST environment variable, no read/writable '/var/run/docker.sock' or '//./pipe/docker_engine' and no external provider like Docker machine configured -> [Help 1]
      

      There are a few ways to resolve this, from setting the DOCKER_HOST variable and exposing and outside docker daemon to the container, or mounting the hosts's /var/run/docker.sock into the image. However it is not clear that there is a way to achieve this without requiring developers to include these steps in their Jenkinsfiles. It would be great if for example there was a way to se thte default options that get applied to a docker invocation in a pipeline so that developers do not have to worry about these concerns and this style of build could be supported system-wide.

            Unassigned Unassigned
            keirlawson Keir Lawson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: