Docker workflow plugin - volume leak

35 views
Skip to first unread message

Robert Hafner

unread,
Jul 16, 2020, 8:59:53 AM7/16/20
to Jenkins Users
In our use of the docker workflow plugin we are seeing that volumes are being leaked when the container is removed. Is there an option that can be specified in a pipeline script that will result in the docker workflow plugin running the docker rm command with the -v option?

The problem that we are experiencing seems similar in nature to the following JIRA issues that have been open for some time.
https://issues.jenkins-ci.org/browse/JENKINS-46006
https://issues.jenkins-ci.org/browse/JENKINS-28646

We may be willing to contribute an enhancement to the plugin to support the -v option on the docker rm command if there isn’t a way to do that already. We are considering something along the lines of the following. Would this change be acceptable?

stage("Integration Tests") {
agent {
docker {
image("${params.KIND_DOCKER_CONTAINER}")
alwaysPull true
reuseNode true
removeVolume true // New parameter?
args "-u root --privileged -v ${env.WORKSPACE}:/workspace"
}
}
steps
{
...
}
}

Thanks,
Rob

Robert Hafner

unread,
Jul 17, 2020, 9:21:59 AM7/17/20
to jenkins...@googlegroups.com

Baptiste Mathus

unread,
Aug 13, 2020, 5:39:20 AM8/13/20
to jenkins...@googlegroups.com
Looks like a good idea and enhancement proposal yes. Feel free to propose it.

Thank you

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/72e69bd7-f4f6-4d0d-b013-b8e2eaf6412eo%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages