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

Allow to provide arguments to the docker.build command

XMLWordPrintable

      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…)
      

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

              Created:
              Updated:
              Resolved: