docker-image-tag
CLI tool to search for tags in Docker images (using Docker Registry v2).
Motivation
docker-image-tag is a CLI tool which helps you to search for tags in Docker images.
Think of the following use-cases:
- You want to find the
latest
, oldest
release.
- List all tags, even if there are hundreds of them
- Use SemVer queries to find one or more specific tags
Installation
Go version 1.1 or higher is required. Install or update using the go get command:
$ go get stefanwalther/docker-image-tag
Using brew:
$ brew tap stefanwalther/homebrew-docker-image-tag
$ brew install docker-image-tag
Or download one of the releases.
Usage
Basic usage
$ docker-image-tag -u <DockerHub-User> -p <DockerHub-Password> qlikcore/engine
> 12.215.0
Instead of passing username
and password
, docker-image-tag will also use the two environment variables DOCKER_USER
and DOCKER_PASS
.
Use Cases
No latest
tag
Let's assume there is Docker image with several tags:
Docker image: repo/image
Tags:
11.150.0
11.156.0
12.160.0
12.166.0
Using docker-image_tag you can find the latest version (following semantic versioning rules):
$ docker-image-tag repo/image
> 12.166.0
By providing the --strategy
flag, you can also search for e.g. the oldest version:
$ docker-image-tag repo/image --strategy oldest
> 11.150.0
Commands
get
Get the latest/oldest tag of an image
$ docker-image-tag get repo/image <latest|oldest>
list
Get all tags of an image
$ docker-image-tag list repo/image
version
Get the version of docker-image-tag
$ docker-image-tag version
About
Author
Stefan Walther
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. The process for contributing is outlined below:
- Create a fork of the project
- Work on whatever bug or feature you wish
- Create a pull request (PR)
I cannot guarantee that I will merge all PRs but I will evaluate them all.
License
MIT
This file was generated by verb-generate-readme, v0.6.0, on September 14, 2018.