{"id":29,"date":"2025-03-28T10:00:53","date_gmt":"2025-03-28T09:00:53","guid":{"rendered":"https:\/\/linuxundich.de\/en\/?p=29"},"modified":"2026-10-03T16:58:17","modified_gmt":"2026-10-03T14:58:17","slug":"keeping-docker-containers-up-to-date-with-dockcheck","status":"publish","type":"post","link":"https:\/\/linuxundich.de\/en\/gnu-linux\/keeping-docker-containers-up-to-date-with-dockcheck\/","title":{"rendered":"Keeping Docker containers up to date with Dockcheck"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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 <a href=\"https:\/\/www.portainer.io\/\">Portainer<\/a> or <a href=\"https:\/\/dockge.kuma.pet\/\">Dockge<\/a>. I find the helper script <a href=\"https:\/\/github.com\/mag37\/dockcheck\">Dockcheck<\/a> more practical, though: it runs in the terminal, updates containers automatically, and cleans up in one go, without me having to click through menus.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li class=\"\"><a href=\"#installation-von-dockcheck\">Installing dockcheck<\/a><\/li><li class=\"\"><a href=\"#nutzung-von-dockcheck\">Using dockcheck<\/a><\/li><li class=\"\"><a href=\"#updates-im-blick-behalten\">Keeping an eye on updates<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ac17702d7faa&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ac17702d7faa\" class=\"wp-block-image wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2025\/03\/dockge-1280x864.webp\" alt=\"With Dockge, you would have to trigger every update by hand, and it won't tell you about new updates either.\" style=\"width:100%\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">With Dockge, you would have to trigger every update by hand, and it won&#8217;t tell you about new updates either.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installation-von-dockcheck\">Installing dockcheck<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Dockcheck only needs a working Docker installation including Docker Compose (as a plugin or standalone) and a few minor dependencies such as <code>jq<\/code> and <code>regclient\/regctl<\/code>. If packages are missing, the script installs them itself when needed or prints hints about them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The installation is as simple as it gets:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;curl -L https:\/\/raw.githubusercontent.com\/mag37\/dockcheck\/main\/dockcheck.sh -o ~\/.local\/bin\/dockcheck.sh&lt;\/strong&gt;\n$ &lt;strong&gt;chmod +x ~\/.local\/bin\/dockcheck.sh&lt;\/strong&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After that, you can call the script directly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;dockcheck.sh -h&lt;\/strong&gt;<\/code><\/pre>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background wp-block-paragraph\"><strong>Info:<\/strong> For this to work, the folder <code>~\/.local\/bin<\/code> of course has to be part of your <code>$PATH<\/code> variable. If necessary, add the path to your <code>~\/.bashrc<\/code> or another suitable configuration file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"nutzung-von-dockcheck\">Using dockcheck<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Dockcheck checks the installed container images and updates them if needed. With the <code>-x<\/code> option, Dockcheck uses multiple processes, which speeds things up considerably. A simple update of all containers looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>### Mit Informationen und Nachfragen:\n$ &lt;strong&gt;dockcheck.sh -x 5&lt;\/strong&gt;\n\n### Alle Container automatisiert aktualisieren:\n$ &lt;strong&gt;dockcheck.sh -y -p -x 5&lt;\/strong&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The parameters do the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>-y<\/code>: Automatic updates without asking for confirmation.<\/li>\n\n\n<li><code>-p<\/code>: Removes old, no longer used images after the update.<\/li>\n\n\n<li><code>-x N<\/code>: Parallel update processes (default: 1, can be increased for faster updates).<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to exclude certain containers, you can use the <code>-e<\/code> option. That comes in handy when a major update is pending for an important project, or when a container should simply never be updated.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;dockcheck.sh -x 5 -e nextcloud,withings-gc-bridge&lt;\/strong&gt;\nExcluding these names:\nnextcloud\nwithings-gc-bridge\n\n&amp;#91;##################################################] 31\/31 \n\nContainers on latest version:\nauthelia\nchangedetection-playwright-chrome-1\n...\nwallabag-wallabag-1\n\nContainers with updates available:\n1) changedetection\n2) immich_server\n\nChoose what containers to update.\nEnter number(s) separated by comma, &amp;#91;a] for all - &amp;#91;q] to quit:<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Other useful options are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>-d N<\/code>: Only update images that are at least N days old.<\/li>\n\n\n<li><code>-s<\/code>: Also check stopped containers.<\/li>\n\n<\/ul>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ac17702d8bfa&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ac17702d8bfa\" class=\"wp-block-image wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2025\/03\/dockcheck.webp\" alt=\"With a single command, Dockcheck checks and updates all running Docker containers, which makes managing your own homelab much easier. \" style=\"width:100%\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">With a single command, Dockcheck checks and updates all running Docker containers, which makes managing your own homelab much easier.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"updates-im-blick-behalten\">Keeping an eye on updates<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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&#8217;t notice right away. So it&#8217;s a good idea to keep an eye on news sources like <a href=\"https:\/\/selfh.st\">This Week in Self-Hosted<\/a> to stay informed about changes, and not to just blindly run Dockcheck every single day.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Keep your Docker containers up to date without a web GUI? Dockcheck handles updates and cleanup right in the terminal!<\/p>\n","protected":false},"author":2,"featured_media":28,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"lui_source_id":44233,"lui_source_hash":"2cbffafde84073d919410215dde39b4eab9e402fdb7d0fd85de419c014b04fc7","lui_source_translated":"2026-10-03","lui_source_reviewed":true,"lui_via_url":"","lui_via_label":"","lui_source_url":"","lui_source_label":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-29","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gnu-linux"],"_links":{"self":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":1,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":39,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/29\/revisions\/39"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/media\/28"}],"wp:attachment":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}