docker inspect should show the command with which the instance was invoked
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
When you invoked a docker instance from a command line using the docker run command, you may typically use a lot of arguments like -v, -e, -p, -privileged, etc.
This instance may be running for days before it is requried to stop and re-run it.
However, the rerun might not be from the same terminal or even by the same user.
So, it would be great to be able to inspect the instance and get the exact command with which it was invoked.
For example, after starting a docker instance, the inspect command could show something like:
$ docker inspect myserver_app | grep Command
"Command": "docker run -d --name myserver_app -p 80:80 -e SOME_ENV="good" myserver_image:latest"
or
$ docker inspect -f "{{ .Command }}" myserver_app
docker run -d --name myserver_app -p 80:80 -e SOME_ENV="good" myserver_image:latest
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 by reproducing the example with docker run and docker inspect, including options such as -v, -e, -p, and --privileged. Determine how the requested exact invocation should be represented through docker inspect and docker inspect -f; done means the original command, including its arguments, is available for a running instance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100