-
Improvement
-
Resolution: Not A Defect
-
Major
Currently the image.run command runs in detached mode (-d). Give that the first parameter is args to docker and it is required, users should pass this as -d if they want. Currently you have to pass empty string if you want to use docker run.
[line 142 here](https://github.com/jenkinsci/docker-workflow-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy)
Example:
Today it would return a detached container:
node { docker.image("ubuntu").run('', 'npm test') }
How it could be:
node { docker.image("ubuntu").run('-d', 'npm test') }
Using attach for example:
node { docker.image("ubuntu").run('-a STDOUT', 'npm test') }
This second example today is not even possible, since -a STDOUT -d result in a conflict and docker ends in exception.