Track latest tags for Docker images.
Run from a git clone:
git clone https://github.com/jasperla/docker-tags
bundle install --path vendor/bundle
or install the gem:
gem install docker-tags
All the commands for docker-tags
take a --db /path/to/db
argument to select the SQLite database. Bu default
$PWD/docker-tags.db
is used.
This creates an empty database and creates the needed tables:
docker-tags initdb
In order to start tracking the tags for an image, we have to start following it:
docker-tags follow jasperla/docker-go-cross
In order to stop tracking, run the same command but with unfollow
.
docker-tags latest jasperla/docker-go-cross
This will return a JSON hash for this particular image:
{
"jasperla/docker-go-cross": {
"image": "jasperla/docker-go-cross",
"layer": "c2c017e1",
"tag": "latest"
}
}
In this case there is only one tag, latest
(which is otherwise
filtered). If we follow more images, we can run latest
without any
arguments and the latest tags for all images will be displayed.
To generate a report based on the new tags that were pushed to the
Docker Hub since the last time latest
or report
were ran:
docker-tags report jasperla/docker-go-cross
Just like latest
, report
will also work without any arguments.
Essentially a SQL to JSON conversion of the database:
docker-tags dump
- tests and docs (oh the irony)
MIT, please see the LICENSE file.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request