`docker manifest ls` command to list manifest list draft from local storage
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
Firstly, happy new year to everyone on this first day of 2024!
Getting to the point, whenever I attempt to push or delete a manifest list, I find it challenging to identify which manifest lists have already been created in local storage. While I know they are stored in the directory ~/.docker/manifests, the filenames in the directory are not human-readable. These names cannot guarantee a straightforward conversion to the correct manifest list name because the char / is replaced with underline _. When you attempt to reverse this conversion to obtain the manifest list name, you cannot be certain whether the underline _ should be replaced with / or left unchanged.
To implement the command manifest list, it is essential for the directory names stored in ~/.docker/manifests to be uniquely identifiable. So I decide to replace the char '/' with double underlines __ and the colon : with double dashs (--). Since image names are not allowed to contain double underlines or double dashs, this change does not impact other manifest subcommands.
In the end, I have successfully implemented the desired command locally, like this:
# docker manifest ls
REPOSITORY TAG
example.com/first 1
example.com/second 2
# docker manifest ls -q
example.com/first:1
example.com/second:2
After using the docker manifest ls command, I can easily find the target manifest list to push or delete. It's very convenient!
I am willing to submit a PR, and it could be my first contribution to the Docker Cli project.
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 existing docker manifest subcommands and the local storage directory ~/.docker/manifests. Check how stored names are encoded and how push and delete locate them. Done means docker manifest ls lists locally stored manifest lists with repository and tag, while -q prints fully qualified names.
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