docker / docker/cli

Feature request: Add "docker task" subcommand

Open
#2,920 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi all, I'm working on python-on-whales, which is a python wrapper for the docker CLI. I've had trouble manipulating/creating swarm tasks objects because there is no way to get information about them from the docker CLI.

It's also an issue we noticed in my company, when using the CLI to understand/debug a swarm cluster, we can't access many information about tasks (there is docker service ps, but only a limited amount of information about tasks is displayed).

I suggest adding 3 new cli commands which correspond to the 3 API endpoints in the docker daemon: https://docs.docker.com/engine/api/v1.40/#tag/Task

docker task ls
docker task inspect
docker task logs

I'm not a go programmer so I don't think I'll be able to contribute this feature though.

Thanks again for making docker so awesome :)

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 by reading the Docker Engine API v1.40 Task endpoints and the existing docker service ps behavior. Determine how docker task ls, docker task inspect, and docker task logs should map to those endpoints, including their expected output and options. Done means the three commands provide task information that the current CLI does not expose.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.