jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-57136] Allow users to customize docker timeouts

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

Description

Though docker enables fast creation of containers, docker is still slow when being executed under legacy environment (e.g. dir file system).

Though the timeout for docker commands has been increased to 180/300 seconds by https://issues.jenkins-ci.org/browse/JENKINS-42322, I think the timeout should be configurable.

 

I sometimes get failure like this:

ERROR: Timeout after 180 seconds

[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline

GitHub has been notified of this commit’s build result

java.io.IOException: Failed to run image '****'. Error:

However, the same code just succeeded its build few minutes ago.

That's because the execution time of a docker command varies depending on the system load.

In my example, it took several minutes to create a container.

(As my docker runtime uses dir-based filesystem, on a software raid partition.)

***@***:~$ date; docker run -t ****/bin/ls; date;

Mon Apr 22 16:41:43 ***2019
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
Mon Apr 22 16:43:55 ***2019

(with 6G docker image for latex compilation)

We might conclude to increase the timeout to 10min, but I think we should provide a configurable timeouts (either via web or local configuration file).

---
Originally reported by leeopop, imported from: Allow users to customize docker timeouts


  • status: Open
  • priority: Minor
  • component(s): docker-workflow-plugin, pipeline
  • label(s): configuration, pipeline
  • resolution: Unresolved
  • votes: 5
  • watchers: 6
  • imported: 2025-12-07

Raw content of original issue

Though docker enables fast creation of containers, docker is still slow when being executed under legacy environment (e.g. dir file system).

Though the timeout for docker commands has been increased to 180/300 seconds by https://issues.jenkins-ci.org/browse/JENKINS-42322, I think the timeout should be configurable.

 

I sometimes get failure like this:


ERROR: Timeout after 180 seconds

[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline

GitHub has been notified of this commit’s build result

java.io.IOException: Failed to run image '****'. Error:


However, the same code just succeeded its build few minutes ago.
That's because the execution time of a docker command varies depending on the system load.
In my example, it took several minutes to create a container.
(As my docker runtime uses dir-based filesystem, on a software raid partition.)


***@***:~$ date; docker run -t ****/bin/ls; date;

Mon Apr 22 16:41:43 ***2019
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
Mon Apr 22 16:43:55 ***2019


(with 6G docker image for latex compilation)

We might conclude to increase the timeout to 10min, but I think we should provide a configurable timeouts (either via web or local configuration file).

environment

```
Jenkins installed directly to a Debian LXC and docker is installed inside the LXC.

Jenkins runs outside the docker but the user 'jenkins' has 'docker' group access.

```

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.