Keeping Docker containers up to date with Dockcheck

Christoph Langner Avatar

3 min read

0 views

Keep your Docker containers up to date without a web GUI? Dockcheck handles updates and cleanup right in the terminal!

If you run containers with Docker, you regularly have to update images and clean up old, unused versions. Many people use tools with a web interface for this, such as Portainer or Dockge. I find the helper script Dockcheck more practical, though: it runs in the terminal, updates containers automatically, and cleans up in one go, without me having to click through menus.

Installing dockcheck

Dockcheck only needs a working Docker installation including Docker Compose (as a plugin or standalone) and a few minor dependencies such as jq and regclient/regctl. If packages are missing, the script installs them itself when needed or prints hints about them.

The installation is as simple as it gets:

$ <strong>curl -L https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh -o ~/.local/bin/dockcheck.sh</strong>
$ <strong>chmod +x ~/.local/bin/dockcheck.sh</strong>

After that, you can call the script directly:

$ <strong>dockcheck.sh -h</strong>

Info: For this to work, the folder ~/.local/bin of course has to be part of your $PATH variable. If necessary, add the path to your ~/.bashrc or another suitable configuration file.

Using dockcheck

Dockcheck checks the installed container images and updates them if needed. With the -x option, Dockcheck uses multiple processes, which speeds things up considerably. A simple update of all containers looks like this:

### Mit Informationen und Nachfragen:
$ <strong>dockcheck.sh -x 5</strong>

### Alle Container automatisiert aktualisieren:
$ <strong>dockcheck.sh -y -p -x 5</strong>

The parameters do the following:

  • -y: Automatic updates without asking for confirmation.
  • -p: Removes old, no longer used images after the update.
  • -x N: Parallel update processes (default: 1, can be increased for faster updates).

If you want to exclude certain containers, you can use the -e option. That comes in handy when a major update is pending for an important project, or when a container should simply never be updated.

$ <strong>dockcheck.sh -x 5 -e nextcloud,withings-gc-bridge</strong>
Excluding these names:
nextcloud
withings-gc-bridge

&#91;##################################################] 31/31 

Containers on latest version:
authelia
changedetection-playwright-chrome-1
...
wallabag-wallabag-1

Containers with updates available:
1) changedetection
2) immich_server

Choose what containers to update.
Enter number(s) separated by comma, &#91;a] for all - &#91;q] to quit:

Other useful options are:

  • -d N: Only update images that are at least N days old.
  • -s: Also check stopped containers.

Keeping an eye on updates

Dockcheck makes updating Docker containers very easy, maybe almost too easy. The script installs new container images without any further checks. If an update causes problems or requires manual changes, you won’t notice right away. So it’s a good idea to keep an eye on news sources like This Week in Self-Hosted to stay informed about changes, and not to just blindly run Dockcheck every single day.

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is supported: **bold**, _italic_, [link text](URL), `Code`, lines starting with - for lists, 1. for numbered lists, triple backticks for code blocks.

Security check: Which logo is this?

About the blog

Since 2006 I have been trying out what Linux, free software and the right hardware can do – from distribution tests to Raspberry Pi projects. Hands-on rather than a mere news ticker.

Categories

Tags

Support the blog

Enjoy what you read here? A small donation helps pay for hosting and new test devices – and keeps the coffee coming.

Linux und Ich — Keeping Docker containers up to date with Dockcheck
https://linuxundich.de/en/gnu-linux/keeping-docker-containers-up-to-date-with-dockcheck/ — printed on October 3, 2026