Uploaded image for project: 'Infrastructure'
  1. Infrastructure
  2. INFRA-19523

Jenkins: build docker image within a container

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Waiting for Infra
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Docker, Jenkins
    • Labels:
      None
    • Project:
      Infrastructure

      Description

      Apache Brooklyn is built on Jenkins within a docker container. The pipeline first build an image and then use this to run maven + tests.

      Brooklyn provides different distribution packages: tarball, deb and rpm. We are currently trying to add a docker image to the mix. I create a PR for this (https://github.com/apache/brooklyn-dist/pull/148) which update the `Jenkinsfile` to pass the docker socket to the docker container. But the build fails with the following error message:

      ```
      Failed to execute goal io.fabric8:docker-maven-plugin:0.31.0:remove (cleanup) on project karaf-docker-image: Execution cleanup of goal io.fabric8:docker-maven-plugin:0.31.0:remove 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
      ```

      Note that doing the same thing on my local machine work, but not on Apache Jenkins. Any idea how I can fix this?

        Attachments

          Activity

            People

            • Assignee:
              christ Chris Thistlethwaite
              Reporter:
              tbouron Thomas Bouron
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: