1 min read

Easy Docker Updates with docker-tag-yoinker

I run a large number of docker containers on my two personal servers. It's safer to have the deployments pinned to a specific tag, but manually updating the tags can get tedious. For each image, you have to check the Docker Hub, figure out which tag you want and then update your deployments.

Enter https://github.com/issmirnov/docker-tag-yoinker:

GitHub - issmirnov/docker-tag-yoinker: Updater utility for docker tags
Updater utility for docker tags. Contribute to issmirnov/docker-tag-yoinker development by creating an account on GitHub.

It's a dead simple tool that takes a TOML config and outputs the latest version that matches your rules.

Sample Config

Given a simple config like this:

image = "sourcegraph/server"
blacklist = ["insiders", "rc"]

We can use a script like this to automatically pull the latest matching version:

export TAG=$(dty -config sourcegraph.toml)
docker run --name sourcegraph \
      --restart=always -d --publish 8220:7080 --publish 2633:2633 \
      --volume ~/.sourcegraph/config:/etc/sourcegraph  \
      --volume ~/.sourcegraph/data:/var/opt/sourcegraph  \
      sourcegraph/server:$TAG \

It's battle tested and works great. Please enjoy, and feel free to file any bugs on Github.