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

Allow to provide arguments to the docker.build command

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: docker-workflow-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      At the moment, it is not possible to apply arguments for the `docker.build` command.

      For example, if I want to use the `--pull` flag to ensures that the base image is the latest version, I need to use either:

      sh "docker build --pull -t name ."
      dockerFingerprintFrom dockerfile: 'Dockerfile', image: 'name', toolName: env.DOCKER_TOOL_NAME
      def img = docker.image('name')
      

      or

      docker.image('the-base-image').pull()
      docker.build(…as before…)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pwagner Pete Wagner
                Reporter:
                allan_burdajewicz Allan BURDAJEWICZ
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: