jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-40101] Different behavior between debian container using docker.inside

Open
#458 10 comments 0 reactions 0 assignees View on GitHub
component:docker-workflow-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
527
Forks
422
Avg merge
10m
Merged PRs (30d)
1

Description

Hi,

I have a weird behavior when I try to use the docker image debian:wheezy. Whatever I try to do inside this container, it looks like docker manager don't wait for the command to be proceed.

Here is the Jenkinsfile I'm using:

#!groovy

stage('run') {
node('docker') {
docker.image('debian:wheezy').inside {
sh "sleep 30s"
}
}
}

The image is well pulled and a container is well ran but when it comes to do the sleep command, well, it just pass and return a bad exit code and output

ERROR: script returned exit code -1

If you replace debian:wheezy with anything else like debian:jessie or ubuntu:whatever it works.

Basically, the container don't seems to have any issue by itself but, when used on a Jenkinsfile pipeline using this plugin its seems to be broken. Actually I don't know if the issue is the plugin or the container: enlight me please !

PS: Thx for your amazing job <3

---
Originally reported by clementgautier, imported from: Different behavior between debian container using docker.inside


  • status: Open
  • priority: Minor
  • component(s): docker-workflow-plugin
  • resolution: Unresolved
  • votes: 8
  • watchers: 13
  • imported: 2025-12-07

Raw content of original issue

Hi,

I have a weird behavior when I try to use the docker image debian:wheezy. Whatever I try to do inside this container, it looks like docker manager don't wait for the command to be proceed.

Here is the Jenkinsfile I'm using:


#!groovy

stage('run') {
node('docker') {
docker.image('debian:wheezy').inside {
sh "sleep 30s"
}
}
}

The image is well pulled and a container is well ran but when it comes to do the sleep command, well, it just pass and return a bad exit code and output


ERROR: script returned exit code -1


If you replace debian:wheezy with anything else like debian:jessie or ubuntu:whatever it works.

Basically, the container don't seems to have any issue by itself but, when used on a Jenkinsfile pipeline using this plugin its seems to be broken. Actually I don't know if the issue is the plugin or the container: enlight me please !

PS: Thx for your amazing job <3

  • environment: Jenkins 2.19.3 on a Debian 8, remote slave agents running on empty Debian 8 with only docker

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.