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

Allow a command argument to be passed to Image.withRun

XMLWordPrintable

      As a user of docker.WithRun, I Should Be Able To specify command arguments for the Docker run So That I Can provide arguments to containers that are meant to be run like commands (e.g have custom entrypoints defined).

      == Acceptance Criteria ==
      Given I run a docker container
      When I run the Groovy syntax of docker.image(busybox).withRun(args: "-v /tmp:/tmp", command: "ls -la /tmp")
      Then I expect the underlying docker run command to look like the following "docker run -d -v /tmp:/tmp busybox ls -la /tmp"

      === Notes ====
      Expand arguments to https://github.com/jenkinsci/docker-workflow-plugin/blob/153c70d5e863eb499b49d08d6992f3eff3ca586a/src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy#L133 to allow "command" optional argument as well.

            cachavezley Christian Alonso Chavez Ley
            covalence Domingo K
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: