docker / docker/cli

Add default (and custom) timeout to --detach=false option

Open
#663 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area/swarm kind/enhancement
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Description

Is there a possibility to add a timeout to all --detach=false ?
In case the tasks are not shchedulable, the process seems to hang for ever
We use this in our CI to get status of the create/update service command
The workaround is to not use this option and check the status manually...

Steps to reproduce the issue:

  1. docker service create --name testservice --detach=false --constraint node.platform.os==bados nginx:alpine

Describe the results you received:
Hang for ever

Describe the results you expected:
Hang for a time, and then display a message, like :

timeout reach
Operation continuing in background
Use `docker service ps id` to check progress.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the Docker CLI handling for docker service create and the --detach=false option. Reproduce the unschedulable node.platform.os==bados constraint case, then trace how the command waits for service convergence. Done means a default and configurable timeout produce the requested message while the operation continues in the background.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.