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

Allow a command argument to be passed to Image.withRun

    Details

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

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: