Feature request, dry run mode that prints the cli commands
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
I have a feature request (That im willing to contribute towards if you'll be interested).
When developing with docker in my workplace, we often use the docker cli or the docker compose config yaml.
The only cases where we use the python SDK is when we need the run to be dynamically generated to the point where scripting the CLI command wont be too ugly/dirty.
Whenever me and my team try to use the SDK, we always have bugs in our development cycle that stem from the fact that we accidentally did not translate the CLI syntax to the SDK syntax correctly.
It would be very useful if the SDK's client.containers.run end point (and maybe some others) took something like a dryrun flag,
such that when its true, we would only get the cli command that would have been equivalent to the SDK run. If such a feature would be implemented, we could simply run the SDK in dryrun mode until we got the exact command we wanted and only then switched it off, making the development experience much better.
Is this possible/desirable?
Thanks in advance for reading.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the client.containers.run endpoint and compare its SDK arguments with the equivalent Docker CLI command. Define the dry-run output and determine whether the same behavior should apply to other endpoints; the issue does not name files or tests, so the scope needs maintainer clarification before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100