Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ class Docker implements Serializable {
}
}

public Container run(String args = '', String command = "") {
public Container run(String args = '', String command = "", boolean foreground = false) {
docker.node {
def container = docker.script."${docker.shell()}"(script: "docker run -d${args != '' ? ' ' + args : ''} ${id}${command != '' ? ' ' + command : ''}", returnStdout: true).trim()
def container = docker.script."${docker.shell()}"(script: "docker run ${!foreground ? '-d' : ''} ${args != '' ? ' ' + args : ''} ${id}${command != '' ? ' ' + command : ''}", returnStdout: true).trim()
new Container(docker, container)
}
}
Expand Down