kawana77b/docker-tags-zig
CLI tool to search Docker Hub image tags by zig
c8cd1144aa800f87db3c4bee3d1f0fa0e8c96feb.zip
refs
46b6ad9b5970def35fa43c9613cd244f28862fa9.zip
1cb43e85cc812ecbbfaf11b11d0061cd065d9e1c.zip
Search dockerhub tags. I made it using Zig.
Usage: docker-tags [options] <IMAGE>...
Description: Search for image tags from DockerHub
-h, --help
Display this help and exit.
-v, --version
Output version information and exit.
-i, --with-image
Connect and display image names and tags.
-b, --browse
Open the URL in the browser.
-l, --limit <count>
Limit the number of tags to display. (default: 30)
-d, --detail
Displays detailed information in table.
<IMAGE>...
docker-tags node
docker-tags tensorflow/tensorflow -i # Image name and tag in combination, such as python:latest
docker-tags python -l 100 # Set the number of searches. default 30.
docker-tags python -b # Display the DockerHub page in your browser (Linux must be able to use xdg-open)
Basically, it appears as follows:
$ docker-tags node
lts-jod
lts-bullseye
lts-bookworm
lts
latest
...
Use the -d
option to display the table and see more detailed information.
$ docker-tags node -d
image tag architectures full_size last_pushed image_tag
node lts-jod amd64 / arm / arm64 / ppc64le / s390x 386.46 MB 2025-01-14 16:39:46 node:lts-jod
node lts-bullseye amd64 / arm / arm64 360.58 MB 2025-01-15 01:40:30 node:lts-bullseye
node lts-bookworm amd64 / arm / arm64 / ppc64le / s390x 386.46 MB 2025-01-14 16:39:46 node:lts-bookworm
node lts amd64 / arm / arm64 / ppc64le / s390x 386.46 MB 2025-01-15 01:40:16 node:lts
node latest amd64 / arm / arm64 / ppc64le / s390x 387.87 MB 2025-01-14 16:40:32 node:latest
node jod-bullseye amd64 / arm / arm64 360.58 MB 2025-01-15 01:40:30 node:jod-bullseye
node jod-bookworm amd64 / arm / arm64 / ppc64le / s390x 386.46 MB 2025-01-14 19:40:16 node:jod-bookworm
node jod amd64 / arm / arm64 / ppc64le / s390x 386.46 MB 2025-01-14 16:39:46 node:jod
node iron-bullseye amd64 / arm / arm64 353.44 MB 2025-01-15 01:39:41 node:iron-bullseye
node iron-bookworm amd64 / arm / arm64 / ppc64le / s390x 379.32 MB 2025-01-14 19:39:22 node:iron-bookworm
node iron amd64 / arm / arm64 / ppc64le / s390x 379.32 MB 2025-01-14 19:39:22 node:iron
node hydrogen-bullseye amd64 / arm / arm64 351.03 MB 2025-01-15 01:38:49 node:hydrogen-bullseye
...
It can be used as a docker cli plugin (v0.1.2~). That is, this tool can also be used as a subcommand of docker
.
For example:
docker tags ubuntu -d
To use it as a plugin, place the docker-tags
binary in the following location:
~/.docker/cli-plugins
With Zig, this is due to the motivation to make it cross-platform and small binary. I created it by hand and am satisfied with its size of approximately 1000 KB, which is much smaller for my personal tool. There are several better similar tools.
The following third-party libraries are used:
I hope that by making it open source, it will be useful to someone for something!
Zig is difficult for me as a beginner, but fun! 👍