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

Using "Force Pull" never pulls from the registry

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Labels:
    • Environment:
      Jenkins 1.642
      Docker Build and Publish 1.1
      Jenkins is running as a docker container using onesysadmin/jenkins-docker-executors
      Running under Ubuntu 14.04
      Builds are performed on on-demand EC2 slaves
    • Similar Issues:

      Description

      I'm using Docker Build and Publish to build an image using a non-default Dockerfile and publish to the repository. The build and publish steps work fine, but I don't want to go through all the build steps every time - I want new builds to take all non-changed steps from the Docker cache.

      This works fine if I issue sequential builds on the same slave, but as I'm using on-demand EC2 slaves, these go down and when I start a new build it has to run through all the steps on the new slave.

      I was under the impression that the "Force Pull" checkbox under "Advanced" (documented as "Update the source image before building even when it exists locally") would issue a `docker pull` from the registry before starting the build (though from the text, it looks like it should have pulled on a new slave anyway?) - but that doesn't seem to work: no pull is shown in the log, and the build is always started from scratch.

      My configuration is shown in the screenshot

        Attachments

          Activity

          Hide
          csanchez Carlos Sanchez added a comment -

          force pull will update the source image (the one in FROM), not your image
          It just uses the --pull flag from docker build https://docs.docker.com/engine/reference/commandline/build/

          If that is not the case please reopen with some build logs

          Show
          csanchez Carlos Sanchez added a comment - force pull will update the source image (the one in FROM), not your image It just uses the --pull flag from docker build https://docs.docker.com/engine/reference/commandline/build/ If that is not the case please reopen with some build logs

            People

            Assignee:
            csanchez Carlos Sanchez
            Reporter:
            guss77 Oded Arbel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: