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

Allow to provide arguments to the docker.build command

    XMLWordPrintable

Details

    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

            allan_burdajewicz Allan BURDAJEWICZ created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-33063 [ JENKINS-33063 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-34317 [ JENKINS-34317 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 44 (Web Link)" [ 14562 ]
            jglick Jesse Glick made changes -
            Assignee Jesse Glick [ jglick ] Pete Wagner [ pwagner ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 170070 ] JNJira + In-Review [ 198778 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-808 (Web Link)" [ 18823 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: