Deployed 9b998fb with MkDocs version: 1.1.2

pull/763/head
4 years ago
parent 53c402703e
commit 1731302145

@ -8,8 +8,9 @@
<link rel="shortcut icon" href="/watchtower/assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <link rel="shortcut icon" href="/watchtower/images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -17,10 +18,10 @@
<link rel="stylesheet" href="/watchtower/assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="/watchtower/assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="/watchtower/assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="/watchtower/assets/stylesheets/palette.196e0c26.min.css">
@ -35,6 +36,8 @@
<link rel="stylesheet" href="/watchtower/stylesheets/theme.css">
@ -47,7 +50,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -60,12 +63,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="/watchtower/images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -94,7 +98,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -145,12 +149,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="/watchtower/images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -177,7 +182,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/." title="Home" class="md-nav__link"> <a href="/watchtower/." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -189,7 +194,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/introduction/" title="Introduction" class="md-nav__link"> <a href="/watchtower/introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -201,7 +206,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/usage-overview/" title="Usage overview" class="md-nav__link"> <a href="/watchtower/usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -213,7 +218,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/arguments/" title="Arguments" class="md-nav__link"> <a href="/watchtower/arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -225,7 +230,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/notifications/" title="Notifications" class="md-nav__link"> <a href="/watchtower/notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -237,7 +242,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/container-selection/" title="Container selection" class="md-nav__link"> <a href="/watchtower/container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -249,7 +254,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/private-registries/" title="Private registries" class="md-nav__link"> <a href="/watchtower/private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -261,7 +266,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/linked-containers/" title="Linked containers" class="md-nav__link"> <a href="/watchtower/linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -273,7 +278,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="/watchtower/remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -285,7 +290,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/secure-connections/" title="Secure connections" class="md-nav__link"> <a href="/watchtower/secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -297,7 +302,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/stop-signals/" title="Stop signals" class="md-nav__link"> <a href="/watchtower/stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -309,7 +314,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="/watchtower/lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -321,7 +326,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/watchtower/running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="/watchtower/running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -369,8 +374,8 @@
</div> </div>
<script src="/watchtower/assets/javascripts/vendor.77e55a48.min.js"></script> <script src="/watchtower/assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="/watchtower/assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="/watchtower/assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/arguments/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/arguments/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -67,12 +70,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -101,7 +105,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -152,12 +156,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -184,7 +189,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -196,7 +201,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -208,7 +213,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -231,7 +236,7 @@
<span class="md-nav__icon md-icon"></span> <span class="md-nav__icon md-icon"></span>
</label> </label>
<a href="./" title="Arguments" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Arguments Arguments
</a> </a>
@ -454,7 +459,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -466,7 +471,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -478,7 +483,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -490,7 +495,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -502,7 +507,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -514,7 +519,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -526,7 +531,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -538,7 +543,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -550,7 +555,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -795,129 +800,129 @@
will be the local Docker daemon, but you can override it with the <code>--host</code> option described in the next section). However, you will be the local Docker daemon, but you can override it with the <code>--host</code> option described in the next section). However, you
can restrict watchtower to monitoring a subset of the running containers by specifying the container names as arguments when can restrict watchtower to monitoring a subset of the running containers by specifying the container names as arguments when
launching watchtower.</p> launching watchtower.</p>
<pre><code class="bash">$ docker run -d \ <div class="codehilite"><pre><span></span><code>$ docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
containrrr/watchtower \ containrrr/watchtower <span class="se">\</span>
nginx redis nginx redis
</code></pre> </code></pre></div>
<p>In the example above, watchtower will only monitor the containers named "nginx" and "redis" for updates -- all of the other <p>In the example above, watchtower will only monitor the containers named "nginx" and "redis" for updates -- all of the other
running containers will be ignored. If you do not want watchtower to run as a daemon you can pass the <code>--run-once</code> flag and remove running containers will be ignored. If you do not want watchtower to run as a daemon you can pass the <code>--run-once</code> flag and remove
the watchtower container after its execution.</p> the watchtower container after its execution.</p>
<pre><code class="bash">$ docker run --rm \ <div class="codehilite"><pre><span></span><code>$ docker run --rm <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
containrrr/watchtower \ containrrr/watchtower <span class="se">\</span>
--run-once \ --run-once <span class="se">\</span>
nginx redis nginx redis
</code></pre> </code></pre></div>
<p>In the example above, watchtower will execute an upgrade attempt on the containers named "nginx" and "redis". Using this mode will enable debugging output showing all actions performed, as usage is intended for interactive users. Once the attempt is completed, the container will exit and remove itself due to the <code>--rm</code> flag.</p> <p>In the example above, watchtower will execute an upgrade attempt on the containers named "nginx" and "redis". Using this mode will enable debugging output showing all actions performed, as usage is intended for interactive users. Once the attempt is completed, the container will exit and remove itself due to the <code>--rm</code> flag.</p>
<p>When no arguments are specified, watchtower will monitor all running containers.</p> <p>When no arguments are specified, watchtower will monitor all running containers.</p>
<h2 id="help">Help<a class="headerlink" href="#help" title="Permanent link">&para;</a></h2> <h2 id="help">Help<a class="headerlink" href="#help" title="Permanent link">&para;</a></h2>
<p>Shows documentation about the supported flags.</p> <p>Shows documentation about the supported flags.</p>
<pre><code> Argument: --help <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --help</span>
Environment Variable: N/A <span class="err">Environment Variable: N/A</span>
Type: N/A <span class="err"> Type: N/A</span>
Default: N/A <span class="err"> Default: N/A</span>
</code></pre> </code></pre></div>
<h2 id="time_zone">Time Zone<a class="headerlink" href="#time_zone" title="Permanent link">&para;</a></h2> <h2 id="time_zone">Time Zone<a class="headerlink" href="#time_zone" title="Permanent link">&para;</a></h2>
<p>Sets the time zone to be used by WatchTower's logs and the optional Cron scheduling argument (--schedule). If this environment variable is not set, Watchtower will use the default time zone: UTC. <p>Sets the time zone to be used by WatchTower's logs and the optional Cron scheduling argument (--schedule). If this environment variable is not set, Watchtower will use the default time zone: UTC.
To find out the right value, see <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">this list</a>, find your location and use the value in <em>TZ Database Name</em>, e.g <em>Europe/Rome</em>. The timezome can alternatively be set by volume mounting your hosts /etc/timezone file. <code>-v /etc/timezone:/etc/timezone:ro</code></p> To find out the right value, see <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">this list</a>, find your location and use the value in <em>TZ Database Name</em>, e.g <em>Europe/Rome</em>. The timezone can alternatively be set by volume mounting your hosts /etc/timezone file. <code>-v /etc/timezone:/etc/timezone:ro</code></p>
<pre><code> Argument: N/A <div class="codehilite"><pre><span></span><code><span class="err"> Argument: N/A</span>
Environment Variable: TZ <span class="err">Environment Variable: TZ</span>
Type: String <span class="err"> Type: String</span>
Default: &quot;UTC&quot; <span class="err"> Default: &quot;UTC&quot;</span>
</code></pre> </code></pre></div>
<h2 id="cleanup">Cleanup<a class="headerlink" href="#cleanup" title="Permanent link">&para;</a></h2> <h2 id="cleanup">Cleanup<a class="headerlink" href="#cleanup" title="Permanent link">&para;</a></h2>
<p>Removes old images after updating. When this flag is specified, watchtower will remove the old image after restarting a container with a new image. Use this option to prevent the accumulation of orphaned images on your system as containers are updated.</p> <p>Removes old images after updating. When this flag is specified, watchtower will remove the old image after restarting a container with a new image. Use this option to prevent the accumulation of orphaned images on your system as containers are updated.</p>
<pre><code> Argument: --cleanup <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --cleanup</span>
Environment Variable: WATCHTOWER_CLEANUP <span class="err">Environment Variable: WATCHTOWER_CLEANUP</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="remove_attached_volumes">Remove attached volumes<a class="headerlink" href="#remove_attached_volumes" title="Permanent link">&para;</a></h2> <h2 id="remove_attached_volumes">Remove attached volumes<a class="headerlink" href="#remove_attached_volumes" title="Permanent link">&para;</a></h2>
<p>Removes attached volumes after updating. When this flag is specified, watchtower will remove all attached volumes from the container before restarting with a new image. Use this option to force new volumes to be populated as containers are updated.</p> <p>Removes attached volumes after updating. When this flag is specified, watchtower will remove all attached volumes from the container before restarting with a new image. Use this option to force new volumes to be populated as containers are updated.</p>
<pre><code> Argument: --remove-volumes <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --remove-volumes</span>
Environment Variable: WATCHTOWER_REMOVE_VOLUMES <span class="err">Environment Variable: WATCHTOWER_REMOVE_VOLUMES</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="debug">Debug<a class="headerlink" href="#debug" title="Permanent link">&para;</a></h2> <h2 id="debug">Debug<a class="headerlink" href="#debug" title="Permanent link">&para;</a></h2>
<p>Enable debug mode with verbose logging.</p> <p>Enable debug mode with verbose logging.</p>
<pre><code> Argument: --debug, -d <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --debug, -d</span>
Environment Variable: WATCHTOWER_DEBUG <span class="err">Environment Variable: WATCHTOWER_DEBUG</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="trace">Trace<a class="headerlink" href="#trace" title="Permanent link">&para;</a></h2> <h2 id="trace">Trace<a class="headerlink" href="#trace" title="Permanent link">&para;</a></h2>
<p>Enable trace mode with very verbose logging. Caution: exposes credentials!</p> <p>Enable trace mode with very verbose logging. Caution: exposes credentials!</p>
<pre><code> Argument: --trace <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --trace</span>
Environment Variable: WATCHTOWER_TRACE <span class="err">Environment Variable: WATCHTOWER_TRACE</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="ansi_colors">ANSI colors<a class="headerlink" href="#ansi_colors" title="Permanent link">&para;</a></h2> <h2 id="ansi_colors">ANSI colors<a class="headerlink" href="#ansi_colors" title="Permanent link">&para;</a></h2>
<p>Disable ANSI color escape codes in log output.</p> <p>Disable ANSI color escape codes in log output.</p>
<pre><code> Argument: --no-color <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --no-color</span>
Environment Variable: NO_COLOR <span class="err">Environment Variable: NO_COLOR</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="docker_host">Docker host<a class="headerlink" href="#docker_host" title="Permanent link">&para;</a></h2> <h2 id="docker_host">Docker host<a class="headerlink" href="#docker_host" title="Permanent link">&para;</a></h2>
<p>Docker daemon socket to connect to. Can be pointed at a remote Docker host by specifying a TCP endpoint as "tcp://hostname:port".</p> <p>Docker daemon socket to connect to. Can be pointed at a remote Docker host by specifying a TCP endpoint as "tcp://hostname:port".</p>
<pre><code> Argument: --host, -h <div class="codehilite"><pre><span></span><code> <span class="n">Argument</span><span class="p">:</span> <span class="o">--</span><span class="n">host</span><span class="p">,</span> <span class="o">-</span><span class="n">H</span>
Environment Variable: DOCKER_HOST <span class="n">Environment</span> <span class="n">Variable</span><span class="p">:</span> <span class="n">DOCKER_HOST</span>
Type: String <span class="n">Type</span><span class="p">:</span> <span class="nb nb-Type">String</span>
Default: &quot;unix:///var/run/docker.sock&quot; <span class="n">Default</span><span class="p">:</span> <span class="s2">&quot;unix:///var/run/docker.sock&quot;</span>
</code></pre> </code></pre></div>
<h2 id="docker_api_version">Docker API version<a class="headerlink" href="#docker_api_version" title="Permanent link">&para;</a></h2> <h2 id="docker_api_version">Docker API version<a class="headerlink" href="#docker_api_version" title="Permanent link">&para;</a></h2>
<p>The API version to use by the Docker client for connecting to the Docker daemon. The minimum supported version is 1.24.</p> <p>The API version to use by the Docker client for connecting to the Docker daemon. The minimum supported version is 1.24.</p>
<pre><code> Argument: --api-version, -a <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --api-version, -a</span>
Environment Variable: DOCKER_API_VERSION <span class="err">Environment Variable: DOCKER_API_VERSION</span>
Type: String <span class="err"> Type: String</span>
Default: &quot;1.24&quot; <span class="err"> Default: &quot;1.24&quot;</span>
</code></pre> </code></pre></div>
<h2 id="include_stopped">Include stopped<a class="headerlink" href="#include_stopped" title="Permanent link">&para;</a></h2> <h2 id="include_stopped">Include stopped<a class="headerlink" href="#include_stopped" title="Permanent link">&para;</a></h2>
<p>Will also include created and exited containers.</p> <p>Will also include created and exited containers.</p>
<pre><code> Argument: --include-stopped <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --include-stopped</span>
Environment Variable: WATCHTOWER_INCLUDE_STOPPED <span class="err">Environment Variable: WATCHTOWER_INCLUDE_STOPPED</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="revive_stopped">Revive stopped<a class="headerlink" href="#revive_stopped" title="Permanent link">&para;</a></h2> <h2 id="revive_stopped">Revive stopped<a class="headerlink" href="#revive_stopped" title="Permanent link">&para;</a></h2>
<p>Start any stopped containers that have had their image updated. This argument is only usable with the <code>--include-stopped</code> argument.</p> <p>Start any stopped containers that have had their image updated. This argument is only usable with the <code>--include-stopped</code> argument.</p>
<pre><code> Argument: --revive-stopped <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --revive-stopped</span>
Environment Variable: WATCHTOWER_REVIVE_STOPPED <span class="err">Environment Variable: WATCHTOWER_REVIVE_STOPPED</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="poll_interval">Poll interval<a class="headerlink" href="#poll_interval" title="Permanent link">&para;</a></h2> <h2 id="poll_interval">Poll interval<a class="headerlink" href="#poll_interval" title="Permanent link">&para;</a></h2>
<p>Poll interval (in seconds). This value controls how frequently watchtower will poll for new images. Either <code>--schedule</code> or a poll interval can be defined, but not both.</p> <p>Poll interval (in seconds). This value controls how frequently watchtower will poll for new images. Either <code>--schedule</code> or a poll interval can be defined, but not both.</p>
<pre><code> Argument: --interval, -i <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --interval, -i</span>
Environment Variable: WATCHTOWER_POLL_INTERVAL <span class="err">Environment Variable: WATCHTOWER_POLL_INTERVAL</span>
Type: Integer <span class="err"> Type: Integer</span>
Default: 300 <span class="err"> Default: 86400 (24 hours)</span>
</code></pre> </code></pre></div>
<h2 id="filter_by_enable_label">Filter by enable label<a class="headerlink" href="#filter_by_enable_label" title="Permanent link">&para;</a></h2> <h2 id="filter_by_enable_label">Filter by enable label<a class="headerlink" href="#filter_by_enable_label" title="Permanent link">&para;</a></h2>
<p>Update containers that have a <code>com.centurylinklabs.watchtower.enable</code> label set to true.</p> <p>Update containers that have a <code>com.centurylinklabs.watchtower.enable</code> label set to true.</p>
<pre><code> Argument: --label-enable <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --label-enable</span>
Environment Variable: WATCHTOWER_LABEL_ENABLE <span class="err">Environment Variable: WATCHTOWER_LABEL_ENABLE</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="filter_by_disable_label">Filter by disable label<a class="headerlink" href="#filter_by_disable_label" title="Permanent link">&para;</a></h2> <h2 id="filter_by_disable_label">Filter by disable label<a class="headerlink" href="#filter_by_disable_label" title="Permanent link">&para;</a></h2>
<p><strong>Do not</strong> update containers that have <code>com.centurylinklabs.watchtower.enable</code> label set to false and no <code>--label-enable</code> argument is passed. Note that only one or the other (targeting by enable label) can be used at the same time to target containers.</p> <p><strong>Do not</strong> update containers that have <code>com.centurylinklabs.watchtower.enable</code> label set to false and no <code>--label-enable</code> argument is passed. Note that only one or the other (targeting by enable label) can be used at the same time to target containers.</p>
@ -927,106 +932,106 @@ Environment Variable: WATCHTOWER_LABEL_ENABLE
<h3 id="please_note">⚠️ Please note<a class="headerlink" href="#please_note" title="Permanent link">&para;</a></h3> <h3 id="please_note">⚠️ Please note<a class="headerlink" href="#please_note" title="Permanent link">&para;</a></h3>
<p>Due to Docker API limitations the latest image will still be pulled from the registry.</p> <p>Due to Docker API limitations the latest image will still be pulled from the registry.</p>
</blockquote> </blockquote>
<pre><code> Argument: --monitor-only <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --monitor-only</span>
Environment Variable: WATCHTOWER_MONITOR_ONLY <span class="err">Environment Variable: WATCHTOWER_MONITOR_ONLY</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<p>Note that monitor-only can also be specified on a per-container basis with the <code>com.centurylinklabs.watchtower.monitor-only</code> label set on those containers.</p> <p>Note that monitor-only can also be specified on a per-container basis with the <code>com.centurylinklabs.watchtower.monitor-only</code> label set on those containers.</p>
<h2 id="without_restarting_containers">Without restarting containers<a class="headerlink" href="#without_restarting_containers" title="Permanent link">&para;</a></h2> <h2 id="without_restarting_containers">Without restarting containers<a class="headerlink" href="#without_restarting_containers" title="Permanent link">&para;</a></h2>
<p>Do not restart containers after updating. This option can be useful when the start of the containers <p>Do not restart containers after updating. This option can be useful when the start of the containers
is managed by an external system such as systemd.</p> is managed by an external system such as systemd.</p>
<pre><code> Argument: --no-restart <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --no-restart</span>
Environment Variable: WATCHTOWER_NO_RESTART <span class="err">Environment Variable: WATCHTOWER_NO_RESTART</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="without_pulling_new_images">Without pulling new images<a class="headerlink" href="#without_pulling_new_images" title="Permanent link">&para;</a></h2> <h2 id="without_pulling_new_images">Without pulling new images<a class="headerlink" href="#without_pulling_new_images" title="Permanent link">&para;</a></h2>
<p>Do not pull new images. When this flag is specified, watchtower will not attempt to pull <p>Do not pull new images. When this flag is specified, watchtower will not attempt to pull
new images from the registry. Instead it will only monitor the local image cache for changes. new images from the registry. Instead it will only monitor the local image cache for changes.
Use this option if you are building new images directly on the Docker host without pushing Use this option if you are building new images directly on the Docker host without pushing
them to a registry.</p> them to a registry.</p>
<pre><code> Argument: --no-pull <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --no-pull</span>
Environment Variable: WATCHTOWER_NO_PULL <span class="err">Environment Variable: WATCHTOWER_NO_PULL</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="without_sending_a_startup_message">Without sending a startup message<a class="headerlink" href="#without_sending_a_startup_message" title="Permanent link">&para;</a></h2> <h2 id="without_sending_a_startup_message">Without sending a startup message<a class="headerlink" href="#without_sending_a_startup_message" title="Permanent link">&para;</a></h2>
<p>Do not send a message after watchtower started. Otherwise there will be an info-level notification.</p> <p>Do not send a message after watchtower started. Otherwise there will be an info-level notification.</p>
<pre><code> Argument: --no-startup-message <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --no-startup-message</span>
Environment Variable: WATCHTOWER_NO_STARTUP_MESSAGE <span class="err">Environment Variable: WATCHTOWER_NO_STARTUP_MESSAGE</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="run_once">Run once<a class="headerlink" href="#run_once" title="Permanent link">&para;</a></h2> <h2 id="run_once">Run once<a class="headerlink" href="#run_once" title="Permanent link">&para;</a></h2>
<p>Run an update attempt against a container name list one time immediately and exit.</p> <p>Run an update attempt against a container name list one time immediately and exit.</p>
<pre><code> Argument: --run-once <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --run-once</span>
Environment Variable: WATCHTOWER_RUN_ONCE <span class="err">Environment Variable: WATCHTOWER_RUN_ONCE</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="http_api_mode">HTTP API Mode<a class="headerlink" href="#http_api_mode" title="Permanent link">&para;</a></h2> <h2 id="http_api_mode">HTTP API Mode<a class="headerlink" href="#http_api_mode" title="Permanent link">&para;</a></h2>
<p>Runs Watchtower in HTTP API mode, only allowing image updates to be triggered by an HTTP request.</p> <p>Runs Watchtower in HTTP API mode, only allowing image updates to be triggered by an HTTP request.</p>
<pre><code> Argument: --http-api <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --http-api</span>
Environment Variable: WATCHTOWER_HTTP_API <span class="err">Environment Variable: WATCHTOWER_HTTP_API</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="http_api_token">HTTP API Token<a class="headerlink" href="#http_api_token" title="Permanent link">&para;</a></h2> <h2 id="http_api_token">HTTP API Token<a class="headerlink" href="#http_api_token" title="Permanent link">&para;</a></h2>
<p>Sets an authentication token to HTTP API requests.</p> <p>Sets an authentication token to HTTP API requests.</p>
<pre><code> Argument: --http-api-token <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --http-api-token</span>
Environment Variable: WATCHTOWER_HTTP_API_TOKEN <span class="err">Environment Variable: WATCHTOWER_HTTP_API_TOKEN</span>
Type: String <span class="err"> Type: String</span>
Default: - <span class="err"> Default: -</span>
</code></pre> </code></pre></div>
<h2 id="filter_by_scope">Filter by scope<a class="headerlink" href="#filter_by_scope" title="Permanent link">&para;</a></h2> <h2 id="filter_by_scope">Filter by scope<a class="headerlink" href="#filter_by_scope" title="Permanent link">&para;</a></h2>
<p>Update containers that have a <code>com.centurylinklabs.watchtower.scope</code> label set with the same value as the given argument. This enables <a href="https://containrrr.github.io/watchtower/running-multiple-instances">running multiple instances</a>.</p> <p>Update containers that have a <code>com.centurylinklabs.watchtower.scope</code> label set with the same value as the given argument. This enables <a href="https://containrrr.github.io/watchtower/running-multiple-instances">running multiple instances</a>.</p>
<pre><code> Argument: --scope <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --scope</span>
Environment Variable: WATCHTOWER_SCOPE <span class="err">Environment Variable: WATCHTOWER_SCOPE</span>
Type: String <span class="err"> Type: String</span>
Default: - <span class="err"> Default: -</span>
</code></pre> </code></pre></div>
<h2 id="scheduling">Scheduling<a class="headerlink" href="#scheduling" title="Permanent link">&para;</a></h2> <h2 id="scheduling">Scheduling<a class="headerlink" href="#scheduling" title="Permanent link">&para;</a></h2>
<p><a href="https://pkg.go.dev/github.com/robfig/cron@v1.2.0?tab=doc#hdr-CRON_Expression_Format">Cron expression</a> in 6 fields (rather than the traditional 5) which defines when and how often to check for new images. Either <code>--interval</code> or the schedule expression <p><a href="https://pkg.go.dev/github.com/robfig/cron@v1.2.0?tab=doc#hdr-CRON_Expression_Format">Cron expression</a> in 6 fields (rather than the traditional 5) which defines when and how often to check for new images. Either <code>--interval</code> or the schedule expression
can be defined, but not both. An example: <code>--schedule "0 0 4 * * *"</code></p> can be defined, but not both. An example: <code>--schedule "0 0 4 * * *"</code></p>
<pre><code> Argument: --schedule, -s <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --schedule, -s</span>
Environment Variable: WATCHTOWER_SCHEDULE <span class="err">Environment Variable: WATCHTOWER_SCHEDULE</span>
Type: String <span class="err"> Type: String</span>
Default: - <span class="err"> Default: -</span>
</code></pre> </code></pre></div>
<h2 id="rolling_restart">Rolling restart<a class="headerlink" href="#rolling_restart" title="Permanent link">&para;</a></h2> <h2 id="rolling_restart">Rolling restart<a class="headerlink" href="#rolling_restart" title="Permanent link">&para;</a></h2>
<p>Restart one image at time instead of stopping and starting all at once. Useful in conjunction with lifecycle hooks <p>Restart one image at time instead of stopping and starting all at once. Useful in conjunction with lifecycle hooks
to implement zero-downtime deploy.</p> to implement zero-downtime deploy.</p>
<pre><code> Argument: --rolling-restart <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --rolling-restart</span>
Environment Variable: WATCHTOWER_ROLLING_RESTART <span class="err">Environment Variable: WATCHTOWER_ROLLING_RESTART</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
<h2 id="wait_until_timeout">Wait until timeout<a class="headerlink" href="#wait_until_timeout" title="Permanent link">&para;</a></h2> <h2 id="wait_until_timeout">Wait until timeout<a class="headerlink" href="#wait_until_timeout" title="Permanent link">&para;</a></h2>
<p>Timeout before the container is forcefully stopped. When set, this option will change the default (<code>10s</code>) wait time to the given value. An example: <code>--stop-timeout 30s</code> will set the timeout to 30 seconds.</p> <p>Timeout before the container is forcefully stopped. When set, this option will change the default (<code>10s</code>) wait time to the given value. An example: <code>--stop-timeout 30s</code> will set the timeout to 30 seconds.</p>
<pre><code> Argument: --stop-timeout <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --stop-timeout</span>
Environment Variable: WATCHTOWER_TIMEOUT <span class="err">Environment Variable: WATCHTOWER_TIMEOUT</span>
Type: Duration <span class="err"> Type: Duration</span>
Default: 10s <span class="err"> Default: 10s</span>
</code></pre> </code></pre></div>
<h2 id="tls_verification">TLS Verification<a class="headerlink" href="#tls_verification" title="Permanent link">&para;</a></h2> <h2 id="tls_verification">TLS Verification<a class="headerlink" href="#tls_verification" title="Permanent link">&para;</a></h2>
<p>Use TLS when connecting to the Docker socket and verify the server's certificate. See below for options used to configure notifications.</p> <p>Use TLS when connecting to the Docker socket and verify the server's certificate. See below for options used to configure notifications.</p>
<pre><code> Argument: --tlsverify <div class="codehilite"><pre><span></span><code><span class="err"> Argument: --tlsverify</span>
Environment Variable: DOCKER_TLS_VERIFY <span class="err">Environment Variable: DOCKER_TLS_VERIFY</span>
Type: Boolean <span class="err"> Type: Boolean</span>
Default: false <span class="err"> Default: false</span>
</code></pre> </code></pre></div>
@ -1045,7 +1050,7 @@ Environment Variable: DOCKER_TLS_VERIFY
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../usage-overview/" title="Usage overview" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../usage-overview/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -1060,7 +1065,7 @@ Environment Variable: DOCKER_TLS_VERIFY
</a> </a>
<a href="../notifications/" title="Notifications" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../notifications/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -1093,8 +1098,8 @@ Environment Variable: DOCKER_TLS_VERIFY
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/container-selection/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/container-selection/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -67,12 +70,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -101,7 +105,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -152,12 +156,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -184,7 +189,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -196,7 +201,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -208,7 +213,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -220,7 +225,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -232,7 +237,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -255,7 +260,7 @@
<span class="md-nav__icon md-icon"></span> <span class="md-nav__icon md-icon"></span>
</label> </label>
<a href="./" title="Container selection" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Container selection Container selection
</a> </a>
@ -297,7 +302,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -309,7 +314,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -321,7 +326,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -333,7 +338,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -345,7 +350,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -357,7 +362,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -369,7 +374,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -437,20 +442,20 @@
</ul> </ul>
<h2 id="full_exclude">Full Exclude<a class="headerlink" href="#full_exclude" title="Permanent link">&para;</a></h2> <h2 id="full_exclude">Full Exclude<a class="headerlink" href="#full_exclude" title="Permanent link">&para;</a></h2>
<p>If you need to exclude some containers, set the <em>com.centurylinklabs.watchtower.enable</em> label to <code>false</code>.</p> <p>If you need to exclude some containers, set the <em>com.centurylinklabs.watchtower.enable</em> label to <code>false</code>.</p>
<pre><code class="docker">LABEL com.centurylinklabs.watchtower.enable=&quot;false&quot; <div class="codehilite"><pre><span></span><code><span class="k">LABEL</span> com.centurylinklabs.watchtower.enable<span class="o">=</span><span class="s2">&quot;false&quot;</span>
</code></pre> </code></pre></div>
<p>Or, it can be specified as part of the <code>docker run</code> command line:</p> <p>Or, it can be specified as part of the <code>docker run</code> command line:</p>
<pre><code class="bash">docker run -d --label=com.centurylinklabs.watchtower.enable=false someimage <div class="codehilite"><pre><span></span><code>docker run -d --label<span class="o">=</span>com.centurylinklabs.watchtower.enable<span class="o">=</span><span class="nb">false</span> someimage
</code></pre> </code></pre></div>
<p>If you need to <a href="https://containrrr.github.io/watchtower/arguments/#filter_by_enable_label">include only containers with the enable label</a>, pass the <code>--label-enable</code> flag or the <code>WATCHTOWER_LABEL_ENABLE</code> environment variable on startup and set the <em>com.centurylinklabs.watchtower.enable</em> label with a value of <code>true</code> for the containers you want to watch.</p> <p>If you need to <a href="https://containrrr.github.io/watchtower/arguments/#filter_by_enable_label">include only containers with the enable label</a>, pass the <code>--label-enable</code> flag or the <code>WATCHTOWER_LABEL_ENABLE</code> environment variable on startup and set the <em>com.centurylinklabs.watchtower.enable</em> label with a value of <code>true</code> for the containers you want to watch.</p>
<pre><code class="docker">LABEL com.centurylinklabs.watchtower.enable=&quot;true&quot; <div class="codehilite"><pre><span></span><code><span class="k">LABEL</span> com.centurylinklabs.watchtower.enable<span class="o">=</span><span class="s2">&quot;true&quot;</span>
</code></pre> </code></pre></div>
<p>Or, it can be specified as part of the <code>docker run</code> command line:</p> <p>Or, it can be specified as part of the <code>docker run</code> command line:</p>
<pre><code class="bash">docker run -d --label=com.centurylinklabs.watchtower.enable=true someimage <div class="codehilite"><pre><span></span><code>docker run -d --label<span class="o">=</span>com.centurylinklabs.watchtower.enable<span class="o">=</span><span class="nb">true</span> someimage
</code></pre> </code></pre></div>
<p>If you wish to create a monitoring scope, you will need to <a href="https://containrrr.github.io/watchtower/running-multiple-instances">run multiple instances and set a scope for each of them</a>.</p> <p>If you wish to create a monitoring scope, you will need to <a href="https://containrrr.github.io/watchtower/running-multiple-instances">run multiple instances and set a scope for each of them</a>.</p>
<p>Watchtower filters running containers by testing them against each configured criteria. A container is monitored if all criteria are met. For example: <p>Watchtower filters running containers by testing them against each configured criteria. A container is monitored if all criteria are met. For example:
@ -459,12 +464,12 @@
<h2 id="monitor_only">Monitor Only<a class="headerlink" href="#monitor_only" title="Permanent link">&para;</a></h2> <h2 id="monitor_only">Monitor Only<a class="headerlink" href="#monitor_only" title="Permanent link">&para;</a></h2>
<p>Individual containers can be marked to only be monitored (without being updated).</p> <p>Individual containers can be marked to only be monitored (without being updated).</p>
<p>To do so, set the <em>com.centurylinklabs.watchtower.monitor-only</em> label to <code>true</code> on that container.</p> <p>To do so, set the <em>com.centurylinklabs.watchtower.monitor-only</em> label to <code>true</code> on that container.</p>
<pre><code class="docker">LABEL com.centurylinklabs.watchtower.monitor-only=&quot;true&quot; <div class="codehilite"><pre><span></span><code><span class="k">LABEL</span> com.centurylinklabs.watchtower.monitor-only<span class="o">=</span><span class="s2">&quot;true&quot;</span>
</code></pre> </code></pre></div>
<p>Or, it can be specified as part of the <code>docker run</code> command line:</p> <p>Or, it can be specified as part of the <code>docker run</code> command line:</p>
<pre><code class="bash">docker run -d --label=com.centurylinklabs.watchtower.monitor-only=true someimage <div class="codehilite"><pre><span></span><code>docker run -d --label<span class="o">=</span>com.centurylinklabs.watchtower.monitor-only<span class="o">=</span><span class="nb">true</span> someimage
</code></pre> </code></pre></div>
<p>When the label is specified on a container, watchtower treats that container exactly as if <a href="https://containrrr.dev/watchtower/arguments/#without_updating_containers"><code>WATCHTOWER_MONITOR_ONLY</code></a> was set, but the effect is limited to the individual container. </p> <p>When the label is specified on a container, watchtower treats that container exactly as if <a href="https://containrrr.dev/watchtower/arguments/#without_updating_containers"><code>WATCHTOWER_MONITOR_ONLY</code></a> was set, but the effect is limited to the individual container. </p>
@ -485,7 +490,7 @@
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../notifications/" title="Notifications" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../notifications/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -500,7 +505,7 @@
</a> </a>
<a href="../private-registries/" title="Private registries" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../private-registries/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -533,8 +538,8 @@
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/http-api-mode/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/http-api-mode/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -62,12 +65,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -96,7 +100,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -147,12 +151,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -179,7 +184,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -191,7 +196,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -203,7 +208,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -215,7 +220,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -227,7 +232,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -239,7 +244,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -251,7 +256,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -263,7 +268,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -275,7 +280,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -287,7 +292,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -299,7 +304,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -311,7 +316,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -323,7 +328,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -354,30 +359,30 @@
</ul> </ul>
<hr /> <hr />
<p>To enable this mode, use the flag <code>--http-api</code>. For example, in a Docker Compose config file:</p> <p>To enable this mode, use the flag <code>--http-api</code>. For example, in a Docker Compose config file:</p>
<pre><code class="json">version: '3' <div class="codehilite"><pre><span></span><code><span class="nt">version</span><span class="p">:</span> <span class="s">&#39;3&#39;</span>
services: <span class="nt">services</span><span class="p">:</span>
app-monitored-by-watchtower: <span class="nt">app-monitored-by-watchtower</span><span class="p">:</span>
image: myapps/monitored-by-watchtower <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">myapps/monitored-by-watchtower</span>
labels: <span class="nt">labels</span><span class="p">:</span>
- &quot;com.centurylinklabs.watchtower.enable=true&quot; <span class="p p-Indicator">-</span> <span class="s">&quot;com.centurylinklabs.watchtower.enable=true&quot;</span>
watchtower: <span class="nt">watchtower</span><span class="p">:</span>
image: containrrr/watchtower <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">containrrr/watchtower</span>
volumes: <span class="nt">volumes</span><span class="p">:</span>
- /var/run/docker.sock:/var/run/docker.sock <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/var/run/docker.sock:/var/run/docker.sock</span>
command: --debug --http-api <span class="nt">command</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">--debug --http-api</span>
environment: <span class="nt">environment</span><span class="p">:</span>
- WATCHTOWER_HTTP_API_TOKEN=mytoken <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">WATCHTOWER_HTTP_API_TOKEN=mytoken</span>
labels: <span class="nt">labels</span><span class="p">:</span>
- &quot;com.centurylinklabs.watchtower.enable=false&quot; <span class="p p-Indicator">-</span> <span class="s">&quot;com.centurylinklabs.watchtower.enable=false&quot;</span>
ports: <span class="nt">ports</span><span class="p">:</span>
- 8080:8080 <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">8080:8080</span>
</code></pre> </code></pre></div>
<p>Notice that there is an environment variable named WATCHTOWER_HTTP_API_TOKEN. To prevent external services from accidentally triggering image updates, all of the requests have to contain a "Token" field, valued as the token defined in WATCHTOWER_HTTP_API_TOKEN, in their headers. In this case, there is a port bind to the host machine, allowing to request localhost:8080 to reach Watchtower. The following <code>curl</code> command would trigger an image update:</p> <p>Notice that there is an environment variable named WATCHTOWER_HTTP_API_TOKEN. To prevent external services from accidentally triggering image updates, all of the requests have to contain a "Token" field, valued as the token defined in WATCHTOWER_HTTP_API_TOKEN, in their headers. In this case, there is a port bind to the host machine, allowing to request localhost:8080 to reach Watchtower. The following <code>curl</code> command would trigger an image update:</p>
<pre><code class="bash">curl -H &quot;Token: mytoken&quot; localhost:8080/v1/update <div class="codehilite"><pre><span></span><code>curl -H <span class="s2">&quot;Token: mytoken&quot;</span> localhost:8080/v1/update
</code></pre> </code></pre></div>
@ -409,8 +414,8 @@ services:
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/">
<link rel="shortcut icon" href="assets/images/favicon.png"> <link rel="shortcut icon" href="images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -67,12 +70,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -101,7 +105,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -152,12 +156,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -195,7 +200,7 @@
<span class="md-nav__icon md-icon"></span> <span class="md-nav__icon md-icon"></span>
</label> </label>
<a href="." title="Home" class="md-nav__link md-nav__link--active"> <a href="." class="md-nav__link md-nav__link--active">
Home Home
</a> </a>
@ -230,7 +235,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="introduction/" title="Introduction" class="md-nav__link"> <a href="introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -242,7 +247,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="usage-overview/" title="Usage overview" class="md-nav__link"> <a href="usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -254,7 +259,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="arguments/" title="Arguments" class="md-nav__link"> <a href="arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -266,7 +271,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="notifications/" title="Notifications" class="md-nav__link"> <a href="notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -278,7 +283,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="container-selection/" title="Container selection" class="md-nav__link"> <a href="container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -290,7 +295,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="private-registries/" title="Private registries" class="md-nav__link"> <a href="private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -302,7 +307,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="linked-containers/" title="Linked containers" class="md-nav__link"> <a href="linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -314,7 +319,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -326,7 +331,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="secure-connections/" title="Secure connections" class="md-nav__link"> <a href="secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -338,7 +343,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="stop-signals/" title="Stop signals" class="md-nav__link"> <a href="stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -350,7 +355,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -362,7 +367,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -413,6 +418,9 @@
</a> </a>
<p style="text-align: center; margin-left: 1.6rem;">
<img src="./images/logo-450px.png" width="450" />
</p>
<h1 align="center"> <h1 align="center">
Watchtower Watchtower
</h1> </h1>
@ -444,21 +452,21 @@
<a href="https://www.codacy.com/app/simskij/watchtower?utm_source=github.com&utm_medium=referral&utm_content=containrrr/watchtower&utm_campaign=Badge_Coverage"> <a href="https://www.codacy.com/app/simskij/watchtower?utm_source=github.com&utm_medium=referral&utm_content=containrrr/watchtower&utm_campaign=Badge_Coverage">
<img alt="Codacy Badge" src="https://api.codacy.com/project/badge/Coverage/3a4d0fcfd26d45b09b1d7ea3c8c13744" /> <img alt="Codacy Badge" src="https://api.codacy.com/project/badge/Coverage/3a4d0fcfd26d45b09b1d7ea3c8c13744" />
</a> </a>
<a href="https://gitter.im/containrrr/watchtower?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
<img alt="Join the chat at https://gitter.im/containrrr/watchtower" src="https://badges.gitter.im/containrrr/watchtower.svg" />
</a>
<a href="#contributors"> <a href="#contributors">
<img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-30-orange.svg?style=flat-square" /> <img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-30-orange.svg?style=flat-square" />
</a> </a>
<a href="https://hub.docker.com/r/containrrr/watchtower">
<img alt="Pulls from DockerHub" src="https://img.shields.io/docker/pulls/containrrr/watchtower.svg?style=flat-square" />
</a>
</p> </p>
<h2 id="quick_start">Quick Start<a class="headerlink" href="#quick_start" title="Permanent link">&para;</a></h2> <h2 id="quick_start">Quick Start<a class="headerlink" href="#quick_start" title="Permanent link">&para;</a></h2>
<p>With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially. Run the watchtower container with the following command:</p> <p>With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially. Run the watchtower container with the following command:</p>
<pre><code>$ docker run -d \ <div class="codehilite"><pre><span></span><code>$ docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
containrrr/watchtower containrrr/watchtower
</code></pre> </code></pre></div>
@ -478,7 +486,7 @@
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="introduction/" title="Introduction" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="introduction/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -511,8 +519,8 @@
</div> </div>
<script src="assets/javascripts/vendor.77e55a48.min.js"></script> <script src="assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/introduction/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/introduction/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -62,12 +65,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -96,7 +100,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -147,12 +151,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -179,7 +184,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -197,7 +202,7 @@
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<a href="./" title="Introduction" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Introduction Introduction
</a> </a>
@ -210,7 +215,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -222,7 +227,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -234,7 +239,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -246,7 +251,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -258,7 +263,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -270,7 +275,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -282,7 +287,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -294,7 +299,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -306,7 +311,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -318,7 +323,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -330,7 +335,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -358,11 +363,11 @@
<p>Watchtower is an application that will monitor your running Docker containers and watch for changes to the images that those containers were originally started from. If watchtower detects that an image has changed, it will automatically restart the container using the new image.</p> <p>Watchtower is an application that will monitor your running Docker containers and watch for changes to the images that those containers were originally started from. If watchtower detects that an image has changed, it will automatically restart the container using the new image.</p>
<p>With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially.</p> <p>With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially.</p>
<p>For example, let's say you were running watchtower along with an instance of <em>centurylink/wetty-cli</em> image:</p> <p>For example, let's say you were running watchtower along with an instance of <em>centurylink/wetty-cli</em> image:</p>
<pre><code class="bash">$ docker ps <div class="codehilite"><pre><span></span><code>$ docker ps
CONTAINER ID IMAGE STATUS PORTS NAMES CONTAINER ID IMAGE STATUS PORTS NAMES
967848166a45 centurylink/wetty-cli Up 10 minutes 0.0.0.0:8080-&gt;3000/tcp wetty 967848166a45 centurylink/wetty-cli Up <span class="m">10</span> minutes <span class="m">0</span>.0.0.0:8080-&gt;3000/tcp wetty
6cc4d2a9d1a5 containrrr/watchtower Up 15 minutes watchtower 6cc4d2a9d1a5 containrrr/watchtower Up <span class="m">15</span> minutes watchtower
</code></pre> </code></pre></div>
<p>Every few minutes watchtower will pull the latest <em>centurylink/wetty-cli</em> image and compare it to the one that was used to run the "wetty" container. If it sees that the image has changed it will stop/remove the "wetty" container and then restart it using the new image and the same <code>docker run</code> options that were used to start the container initially (in this case, that would include the <code>-p 8080:3000</code> port mapping).</p> <p>Every few minutes watchtower will pull the latest <em>centurylink/wetty-cli</em> image and compare it to the one that was used to run the "wetty" container. If it sees that the image has changed it will stop/remove the "wetty" container and then restart it using the new image and the same <code>docker run</code> options that were used to start the container initially (in this case, that would include the <code>-p 8080:3000</code> port mapping).</p>
@ -383,7 +388,7 @@ CONTAINER ID IMAGE STATUS PORTS
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href=".." title="Home" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href=".." class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -398,7 +403,7 @@ CONTAINER ID IMAGE STATUS PORTS
</a> </a>
<a href="../usage-overview/" title="Usage overview" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../usage-overview/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -431,8 +436,8 @@ CONTAINER ID IMAGE STATUS PORTS
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/lifecycle-hooks/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/lifecycle-hooks/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -67,12 +70,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -101,7 +105,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -152,12 +156,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -184,7 +189,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -196,7 +201,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -208,7 +213,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -220,7 +225,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -232,7 +237,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -244,7 +249,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -256,7 +261,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -268,7 +273,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -280,7 +285,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -292,7 +297,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -304,7 +309,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -327,7 +332,7 @@
<span class="md-nav__icon md-icon"></span> <span class="md-nav__icon md-icon"></span>
</label> </label>
<a href="./" title="Lifecycle hooks" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Lifecycle hooks Lifecycle hooks
</a> </a>
@ -402,7 +407,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -540,20 +545,20 @@ container to provide the <code>sh</code> executable.</p>
</tbody> </tbody>
</table> </table>
<p>These labels can be declared as instructions in a Dockerfile (with some example .sh files):</p> <p>These labels can be declared as instructions in a Dockerfile (with some example .sh files):</p>
<pre><code class="docker">LABEL com.centurylinklabs.watchtower.lifecycle.pre-check=&quot;/sync.sh&quot; <div class="codehilite"><pre><span></span><code><span class="k">LABEL</span> com.centurylinklabs.watchtower.lifecycle.pre-check<span class="o">=</span><span class="s2">&quot;/sync.sh&quot;</span>
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update=&quot;/dump-data.sh&quot; <span class="k">LABEL</span> com.centurylinklabs.watchtower.lifecycle.pre-update<span class="o">=</span><span class="s2">&quot;/dump-data.sh&quot;</span>
LABEL com.centurylinklabs.watchtower.lifecycle.post-update=&quot;/restore-data.sh&quot; <span class="k">LABEL</span> com.centurylinklabs.watchtower.lifecycle.post-update<span class="o">=</span><span class="s2">&quot;/restore-data.sh&quot;</span>
LABEL com.centurylinklabs.watchtower.lifecycle.post-check=&quot;/send-heartbeat.sh&quot; <span class="k">LABEL</span> com.centurylinklabs.watchtower.lifecycle.post-check<span class="o">=</span><span class="s2">&quot;/send-heartbeat.sh&quot;</span>
</code></pre> </code></pre></div>
<p>Or be specified as part of the <code>docker run</code> command line:</p> <p>Or be specified as part of the <code>docker run</code> command line:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--label=com.centurylinklabs.watchtower.lifecycle.pre-check=&quot;/sync.sh&quot; \ --label<span class="o">=</span>com.centurylinklabs.watchtower.lifecycle.pre-check<span class="o">=</span><span class="s2">&quot;/sync.sh&quot;</span> <span class="se">\</span>
--label=com.centurylinklabs.watchtower.lifecycle.pre-update=&quot;/dump-data.sh&quot; \ --label<span class="o">=</span>com.centurylinklabs.watchtower.lifecycle.pre-update<span class="o">=</span><span class="s2">&quot;/dump-data.sh&quot;</span> <span class="se">\</span>
--label=com.centurylinklabs.watchtower.lifecycle.post-update=&quot;/restore-data.sh&quot; \ --label<span class="o">=</span>com.centurylinklabs.watchtower.lifecycle.post-update<span class="o">=</span><span class="s2">&quot;/restore-data.sh&quot;</span> <span class="se">\</span>
someimage someimage
--label=com.centurylinklabs.watchtower.lifecycle.post-check=&quot;/send-heartbeat.sh&quot; \ --label<span class="o">=</span>com.centurylinklabs.watchtower.lifecycle.post-check<span class="o">=</span><span class="s2">&quot;/send-heartbeat.sh&quot;</span> <span class="se">\</span>
</code></pre> </code></pre></div>
<h3 id="timeouts">Timeouts<a class="headerlink" href="#timeouts" title="Permanent link">&para;</a></h3> <h3 id="timeouts">Timeouts<a class="headerlink" href="#timeouts" title="Permanent link">&para;</a></h3>
<p>The timeout for all lifecycle commands is 60 seconds. After that, a timeout will <p>The timeout for all lifecycle commands is 60 seconds. After that, a timeout will
@ -586,7 +591,7 @@ log statement containing the exit code will be reported.</p>
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../stop-signals/" title="Stop signals" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../stop-signals/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -601,7 +606,7 @@ log statement containing the exit code will be reported.</p>
</a> </a>
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../running-multiple-instances/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -634,8 +639,8 @@ log statement containing the exit code will be reported.</p>
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/linked-containers/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/linked-containers/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -62,12 +65,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -96,7 +100,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -147,12 +151,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -179,7 +184,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -191,7 +196,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -203,7 +208,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -215,7 +220,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -227,7 +232,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -239,7 +244,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -251,7 +256,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -269,7 +274,7 @@
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<a href="./" title="Linked containers" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Linked containers Linked containers
</a> </a>
@ -282,7 +287,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -294,7 +299,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -306,7 +311,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -318,7 +323,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -330,7 +335,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -376,7 +381,7 @@
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../private-registries/" title="Private registries" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../private-registries/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -391,7 +396,7 @@
</a> </a>
<a href="../remote-hosts/" title="Remote hosts" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../remote-hosts/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -424,8 +429,8 @@
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/notifications/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/notifications/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -67,12 +70,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -101,7 +105,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -152,12 +156,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -184,7 +189,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -196,7 +201,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -208,7 +213,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -220,7 +225,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -245,7 +250,7 @@
<span class="md-nav__icon md-icon"></span> <span class="md-nav__icon md-icon"></span>
</label> </label>
<a href="./" title="Notifications" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Notifications Notifications
</a> </a>
@ -330,7 +335,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -342,7 +347,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -354,7 +359,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -366,7 +371,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -378,7 +383,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -390,7 +395,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -402,7 +407,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -414,7 +419,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -550,66 +555,66 @@ The types of notifications to send are set by passing a comma-separated list of
<li><code>--notification-email-subjecttag</code> (env. <code>WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG</code>): Prefix to include in the subject tag. Useful when running multiple watchtowers.</li> <li><code>--notification-email-subjecttag</code> (env. <code>WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG</code>): Prefix to include in the subject tag. Useful when running multiple watchtowers.</li>
</ul> </ul>
<p>Example:</p> <p>Example:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
-e WATCHTOWER_NOTIFICATIONS=email \ -e <span class="nv">WATCHTOWER_NOTIFICATIONS</span><span class="o">=</span>email <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_EMAIL_FROM=fromaddress@gmail.com \ -e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_FROM</span><span class="o">=</span>fromaddress@gmail.com <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_EMAIL_TO=toaddress@gmail.com \ -e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_TO</span><span class="o">=</span>toaddress@gmail.com <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER=smtp.gmail.com \ -e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_SERVER</span><span class="o">=</span>smtp.gmail.com <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587 \ -e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT</span><span class="o">=</span><span class="m">587</span> <span class="se">\ </span>
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=fromaddress@gmail.com \ -e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER</span><span class="o">=</span>fromaddress@gmail.com <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=app_password \ -e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD</span><span class="o">=</span>app_password <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2 \ -e <span class="nv">WATCHTOWER_NOTIFICATION_EMAIL_DELAY</span><span class="o">=</span><span class="m">2</span> <span class="se">\</span>
containrrr/watchtower containrrr/watchtower
</code></pre> </code></pre></div>
<p>The previous example assumes, that you already have an SMTP server up and running you can connect to. If you don't or you want to bring up watchtower with your own simple SMTP relay the following <code>docker-compose.yml</code> might be a good start for you.</p> <p>The previous example assumes, that you already have an SMTP server up and running you can connect to. If you don't or you want to bring up watchtower with your own simple SMTP relay the following <code>docker-compose.yml</code> might be a good start for you.</p>
<p>The following example assumes, that your domain is called <code>your-domain.com</code> and that you are going to use a certificate valid for <code>smtp.your-domain.com</code>. This hostname has to be used as <code>WATCHTOWER_NOTIFICATION_EMAIL_SERVER</code> otherwise the TLS connection is going to fail with <code>Failed to send notification email</code> or <code>connect: connection refused</code>. We also have to add a network for this setup in order to add an alias to it. If you also want to enable DKIM or other features on the SMTP server, you will find more information at <a href="https://hub.docker.com/r/freinet/postfix-relay">freinet/postfix-relay</a>.</p> <p>The following example assumes, that your domain is called <code>your-domain.com</code> and that you are going to use a certificate valid for <code>smtp.your-domain.com</code>. This hostname has to be used as <code>WATCHTOWER_NOTIFICATION_EMAIL_SERVER</code> otherwise the TLS connection is going to fail with <code>Failed to send notification email</code> or <code>connect: connection refused</code>. We also have to add a network for this setup in order to add an alias to it. If you also want to enable DKIM or other features on the SMTP server, you will find more information at <a href="https://hub.docker.com/r/freinet/postfix-relay">freinet/postfix-relay</a>.</p>
<p>Example including an SMTP relay:</p> <p>Example including an SMTP relay:</p>
<pre><code class="yaml">--- <div class="codehilite"><pre><span></span><code><span class="nn">---</span>
version: &quot;3.8&quot; <span class="nt">version</span><span class="p">:</span> <span class="s">&quot;3.8&quot;</span>
services: <span class="nt">services</span><span class="p">:</span>
watchtower: <span class="nt">watchtower</span><span class="p">:</span>
image: containrrr/watchtower:latest <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">containrrr/watchtower:latest</span>
container_name: watchtower <span class="nt">container_name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">watchtower</span>
environment: <span class="nt">environment</span><span class="p">:</span>
WATCHTOWER_MONITOR_ONLY: &quot;true&quot; <span class="nt">WATCHTOWER_MONITOR_ONLY</span><span class="p">:</span> <span class="s">&quot;true&quot;</span>
WATCHTOWER_NOTIFICATIONS: email <span class="nt">WATCHTOWER_NOTIFICATIONS</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">email</span>
WATCHTOWER_NOTIFICATION_EMAIL_FROM: from-address@your-domain.com <span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_FROM</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">from-address@your-domain.com</span>
WATCHTOWER_NOTIFICATION_EMAIL_TO: to-address@your-domain.com <span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_TO</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">to-address@your-domain.com</span>
# you have to use a network alias here, if you use your own certificate <span class="c1"># you have to use a network alias here, if you use your own certificate</span>
WATCHTOWER_NOTIFICATION_EMAIL_SERVER: smtp.your-domain.com <span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_SERVER</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">smtp.your-domain.com</span>
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT: 25 <span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">25</span>
WATCHTOWER_NOTIFICATION_EMAIL_DELAY: 2 <span class="nt">WATCHTOWER_NOTIFICATION_EMAIL_DELAY</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">2</span>
volumes: <span class="nt">volumes</span><span class="p">:</span>
- /var/run/docker.sock:/var/run/docker.sock <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/var/run/docker.sock:/var/run/docker.sock</span>
networks: <span class="nt">networks</span><span class="p">:</span>
- watchtower <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">watchtower</span>
depends_on: <span class="nt">depends_on</span><span class="p">:</span>
- postfix <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">postfix</span>
# SMTP needed to send out status emails <span class="c1"># SMTP needed to send out status emails</span>
postfix: <span class="nt">postfix</span><span class="p">:</span>
image: freinet/postfix-relay:latest <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">freinet/postfix-relay:latest</span>
expose: <span class="nt">expose</span><span class="p">:</span>
- 25 <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">25</span>
environment: <span class="nt">environment</span><span class="p">:</span>
MAILNAME: somename.your-domain.com <span class="nt">MAILNAME</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">somename.your-domain.com</span>
TLS_KEY: &quot;/etc/ssl/domains/your-domain.com/your-domain.com.key&quot; <span class="nt">TLS_KEY</span><span class="p">:</span> <span class="s">&quot;/etc/ssl/domains/your-domain.com/your-domain.com.key&quot;</span>
TLS_CRT: &quot;/etc/ssl/domains/your-domain.com/your-domain.com.crt&quot; <span class="nt">TLS_CRT</span><span class="p">:</span> <span class="s">&quot;/etc/ssl/domains/your-domain.com/your-domain.com.crt&quot;</span>
TLS_CA: &quot;/etc/ssl/domains/your-domain.com/intermediate.crt&quot; <span class="nt">TLS_CA</span><span class="p">:</span> <span class="s">&quot;/etc/ssl/domains/your-domain.com/intermediate.crt&quot;</span>
volumes: <span class="nt">volumes</span><span class="p">:</span>
- /etc/ssl/domains/your-domain.com/:/etc/ssl/domains/your-domain.com/:ro <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/etc/ssl/domains/your-domain.com/:/etc/ssl/domains/your-domain.com/:ro</span>
networks: <span class="nt">networks</span><span class="p">:</span>
watchtower: <span class="nt">watchtower</span><span class="p">:</span>
# this alias is really important to make your certificate work <span class="c1"># this alias is really important to make your certificate work</span>
aliases: <span class="nt">aliases</span><span class="p">:</span>
- smtp.your-domain.com <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">smtp.your-domain.com</span>
networks: <span class="nt">networks</span><span class="p">:</span>
watchtower: <span class="nt">watchtower</span><span class="p">:</span>
external: false <span class="nt">external</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">false</span>
</code></pre> </code></pre></div>
<h3 id="slack">Slack<a class="headerlink" href="#slack" title="Permanent link">&para;</a></h3> <h3 id="slack">Slack<a class="headerlink" href="#slack" title="Permanent link">&para;</a></h3>
<p>If watchtower is monitoring the same Docker daemon under which the watchtower container itself is running (i.e. if you volume-mounted <em>/var/run/docker.sock</em> into the watchtower container) then it has the ability to update itself. If a new version of the <em>containrrr/watchtower</em> image is pushed to the Docker Hub, your watchtower will pull down the new image and restart itself automatically.</p> <p>If watchtower is monitoring the same Docker daemon under which the watchtower container itself is running (i.e. if you volume-mounted <em>/var/run/docker.sock</em> into the watchtower container) then it has the ability to update itself. If a new version of the <em>containrrr/watchtower</em> image is pushed to the Docker Hub, your watchtower will pull down the new image and restart itself automatically.</p>
@ -623,42 +628,42 @@ networks:
<li><code>--notification-slack-icon-url</code> (env. <code>WATCHTOWER_NOTIFICATION_SLACK_ICON_URL</code>): An icon image URL string to use in place of the default icon.</li> <li><code>--notification-slack-icon-url</code> (env. <code>WATCHTOWER_NOTIFICATION_SLACK_ICON_URL</code>): An icon image URL string to use in place of the default icon.</li>
</ul> </ul>
<p>Example:</p> <p>Example:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
-e WATCHTOWER_NOTIFICATIONS=slack \ -e <span class="nv">WATCHTOWER_NOTIFICATIONS</span><span class="o">=</span>slack <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL=&quot;https://hooks.slack.com/services/xxx/yyyyyyyyyyyyyyy&quot; \ -e <span class="nv">WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL</span><span class="o">=</span><span class="s2">&quot;https://hooks.slack.com/services/xxx/yyyyyyyyyyyyyyy&quot;</span> <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER=watchtower-server-1 \ -e <span class="nv">WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER</span><span class="o">=</span>watchtower-server-1 <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_SLACK_CHANNEL=#my-custom-channel \ -e <span class="nv">WATCHTOWER_NOTIFICATION_SLACK_CHANNEL</span><span class="o">=</span><span class="c1">#my-custom-channel \</span>
-e WATCHTOWER_NOTIFICATION_SLACK_ICON_EMOJI=:whale: \ -e <span class="nv">WATCHTOWER_NOTIFICATION_SLACK_ICON_EMOJI</span><span class="o">=</span>:whale: <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_SLACK_ICON_URL=&lt;icon url&gt; \ -e <span class="nv">WATCHTOWER_NOTIFICATION_SLACK_ICON_URL</span><span class="o">=</span>&lt;icon url&gt; <span class="se">\</span>
containrrr/watchtower containrrr/watchtower
</code></pre> </code></pre></div>
<h3 id="microsoft_teams">Microsoft Teams<a class="headerlink" href="#microsoft_teams" title="Permanent link">&para;</a></h3> <h3 id="microsoft_teams">Microsoft Teams<a class="headerlink" href="#microsoft_teams" title="Permanent link">&para;</a></h3>
<p>To receive notifications in MSTeams channel, add <code>msteams</code> to the <code>--notifications</code> option or the <code>WATCHTOWER_NOTIFICATIONS</code> environment variable.</p> <p>To receive notifications in MSTeams channel, add <code>msteams</code> to the <code>--notifications</code> option or the <code>WATCHTOWER_NOTIFICATIONS</code> environment variable.</p>
<p>Additionally, you should set the MSTeams webhook URL using the <code>--notification-msteams-hook</code> option or the <code>WATCHTOWER_NOTIFICATION_MSTEAMS_HOOK_URL</code> environment variable. This option can also reference a file, in which case the contents of the file are used.</p> <p>Additionally, you should set the MSTeams webhook URL using the <code>--notification-msteams-hook</code> option or the <code>WATCHTOWER_NOTIFICATION_MSTEAMS_HOOK_URL</code> environment variable. This option can also reference a file, in which case the contents of the file are used.</p>
<p>MSTeams notifier could send keys/values filled by <code>log.WithField</code> or <code>log.WithFields</code> as MSTeams message facts. To enable this feature add <code>--notification-msteams-data</code> flag or set <code>WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA=true</code> environment variable.</p> <p>MSTeams notifier could send keys/values filled by <code>log.WithField</code> or <code>log.WithFields</code> as MSTeams message facts. To enable this feature add <code>--notification-msteams-data</code> flag or set <code>WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA=true</code> environment variable.</p>
<p>Example:</p> <p>Example:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
-e WATCHTOWER_NOTIFICATIONS=msteams \ -e <span class="nv">WATCHTOWER_NOTIFICATIONS</span><span class="o">=</span>msteams <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_MSTEAMS_HOOK_URL=&quot;https://outlook.office.com/webhook/xxxxxxxx@xxxxxxx/IncomingWebhook/yyyyyyyy/zzzzzzzzzz&quot; \ -e <span class="nv">WATCHTOWER_NOTIFICATION_MSTEAMS_HOOK_URL</span><span class="o">=</span><span class="s2">&quot;https://outlook.office.com/webhook/xxxxxxxx@xxxxxxx/IncomingWebhook/yyyyyyyy/zzzzzzzzzz&quot;</span> <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA=true \ -e <span class="nv">WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA</span><span class="o">=</span><span class="nb">true</span> <span class="se">\</span>
containrrr/watchtower containrrr/watchtower
</code></pre> </code></pre></div>
<h3 id="gotify">Gotify<a class="headerlink" href="#gotify" title="Permanent link">&para;</a></h3> <h3 id="gotify">Gotify<a class="headerlink" href="#gotify" title="Permanent link">&para;</a></h3>
<p>To push a notification to your Gotify instance, register a Gotify app and specify the Gotify URL and app token:</p> <p>To push a notification to your Gotify instance, register a Gotify app and specify the Gotify URL and app token:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
-e WATCHTOWER_NOTIFICATIONS=gotify \ -e <span class="nv">WATCHTOWER_NOTIFICATIONS</span><span class="o">=</span>gotify <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_GOTIFY_URL=&quot;https://my.gotify.tld/&quot; \ -e <span class="nv">WATCHTOWER_NOTIFICATION_GOTIFY_URL</span><span class="o">=</span><span class="s2">&quot;https://my.gotify.tld/&quot;</span> <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN=&quot;SuperSecretToken&quot; \ -e <span class="nv">WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN</span><span class="o">=</span><span class="s2">&quot;SuperSecretToken&quot;</span> <span class="se">\</span>
containrrr/watchtower containrrr/watchtower
</code></pre> </code></pre></div>
<p><code>-e WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN</code> or <code>--notification-gotify-token</code> can also reference a file, in which case the contents of the file are used.</p> <p><code>-e WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN</code> or <code>--notification-gotify-token</code> can also reference a file, in which case the contents of the file are used.</p>
<p>If you want to disable TLS verification for the Gotify instance, you can use either <code>-e WATCHTOWER_NOTIFICATION_GOTIFY_TLS_SKIP_VERIFY=true</code> or <code>--notification-gotify-tls-skip-verify</code>. </p> <p>If you want to disable TLS verification for the Gotify instance, you can use either <code>-e WATCHTOWER_NOTIFICATION_GOTIFY_TLS_SKIP_VERIFY=true</code> or <code>--notification-gotify-tls-skip-verify</code>. </p>
@ -676,14 +681,14 @@ You can define multiple services by space separating the URLs. (See example belo
<p>The template is a Go <a href="https://golang.org/pkg/text/template/">template</a> and the you format a list of <a href="https://pkg.go.dev/github.com/sirupsen/logrus?tab=doc#Entry">log entries</a>.</p> <p>The template is a Go <a href="https://golang.org/pkg/text/template/">template</a> and the you format a list of <a href="https://pkg.go.dev/github.com/sirupsen/logrus?tab=doc#Entry">log entries</a>.</p>
<p>The default value if not set is <code>{{range .}}{{.Message}}{{println}}{{end}}</code>. The example below uses a template that also outputs timestamp and log level.</p> <p>The default value if not set is <code>{{range .}}{{.Message}}{{println}}{{end}}</code>. The example below uses a template that also outputs timestamp and log level.</p>
<p>Example:</p> <p>Example:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
-e WATCHTOWER_NOTIFICATIONS=shoutrrr \ -e <span class="nv">WATCHTOWER_NOTIFICATIONS</span><span class="o">=</span>shoutrrr <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_URL=&quot;discord://token@channel slack://watchtower@token-a/token-b/token-c&quot; \ -e <span class="nv">WATCHTOWER_NOTIFICATION_URL</span><span class="o">=</span><span class="s2">&quot;discord://token@channel slack://watchtower@token-a/token-b/token-c&quot;</span> <span class="se">\</span>
-e WATCHTOWER_NOTIFICATION_TEMPLATE=&quot;{{range .}}{{.Time.Format \&quot;2006-01-02 15:04:05\&quot;}} ({{.Level}}): {{.Message}}{{println}}{{end}}&quot; \ -e <span class="nv">WATCHTOWER_NOTIFICATION_TEMPLATE</span><span class="o">=</span><span class="s2">&quot;{{range .}}{{.Time.Format \&quot;2006-01-02 15:04:05\&quot;}} ({{.Level}}): {{.Message}}{{println}}{{end}}&quot;</span> <span class="se">\</span>
containrrr/watchtower containrrr/watchtower
</code></pre> </code></pre></div>
@ -702,7 +707,7 @@ You can define multiple services by space separating the URLs. (See example belo
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../arguments/" title="Arguments" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../arguments/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -717,7 +722,7 @@ You can define multiple services by space separating the URLs. (See example belo
</a> </a>
<a href="../container-selection/" title="Container selection" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../container-selection/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -750,8 +755,8 @@ You can define multiple services by space separating the URLs. (See example belo
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/private-registries/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/private-registries/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -67,12 +70,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -101,7 +105,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -152,12 +156,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -184,7 +189,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -196,7 +201,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -208,7 +213,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -220,7 +225,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -232,7 +237,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -244,7 +249,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -264,7 +269,7 @@
<a href="./" title="Private registries" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Private registries Private registries
</a> </a>
@ -277,7 +282,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -289,7 +294,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -301,7 +306,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -313,7 +318,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -325,7 +330,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -337,7 +342,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -387,20 +392,20 @@ There are two ways to generate this configuration file:</p>
<h3 id="create_the_configuration_file_manually">Create the configuration file manually<a class="headerlink" href="#create_the_configuration_file_manually" title="Permanent link">&para;</a></h3> <h3 id="create_the_configuration_file_manually">Create the configuration file manually<a class="headerlink" href="#create_the_configuration_file_manually" title="Permanent link">&para;</a></h3>
<p>Create a new configuration file with the following syntax and a base64 encoded username and <p>Create a new configuration file with the following syntax and a base64 encoded username and
password <code>auth</code> string:</p> password <code>auth</code> string:</p>
<pre><code class="json">{ <div class="codehilite"><pre><span></span><code><span class="p">{</span>
&quot;auths&quot;: { <span class="nt">&quot;auths&quot;</span><span class="p">:</span> <span class="p">{</span>
&quot;&lt;REGISTRY_NAME&gt;&quot;: { <span class="nt">&quot;&lt;REGISTRY_NAME&gt;&quot;</span><span class="p">:</span> <span class="p">{</span>
&quot;auth&quot;: &quot;XXXXXXX&quot; <span class="nt">&quot;auth&quot;</span><span class="p">:</span> <span class="s2">&quot;XXXXXXX&quot;</span>
} <span class="p">}</span>
} <span class="p">}</span>
} <span class="p">}</span>
</code></pre> </code></pre></div>
<p><code>&lt;REGISTRY_NAME&gt;</code> needs to be replaced by the name of your private registry <p><code>&lt;REGISTRY_NAME&gt;</code> needs to be replaced by the name of your private registry
(e.g., <code>my-private-registry.example.org</code>)</p> (e.g., <code>my-private-registry.example.org</code>)</p>
<p>The required <code>auth</code> string can be generated as follows:</p> <p>The required <code>auth</code> string can be generated as follows:</p>
<pre><code class="bash">echo -n 'username:password' | base64 <div class="codehilite"><pre><span></span><code><span class="nb">echo</span> -n <span class="s1">&#39;username:password&#39;</span> <span class="p">|</span> base64
</code></pre> </code></pre></div>
<blockquote> <blockquote>
<h3 id="i_username_and_password_for_gcloud"> Username and Password for GCloud<a class="headerlink" href="#i_username_and_password_for_gcloud" title="Permanent link">&para;</a></h3> <h3 id="i_username_and_password_for_gcloud"> Username and Password for GCloud<a class="headerlink" href="#i_username_and_password_for_gcloud" title="Permanent link">&para;</a></h3>
@ -411,8 +416,8 @@ echo -n "_json_key:$(cat gcloudauth.json)" | base64 -w0</code>
When the watchtower Docker container is started, the created configuration file When the watchtower Docker container is started, the created configuration file
(<code>&lt;PATH&gt;/config.json</code> in this example) needs to be passed to the container:</p> (<code>&lt;PATH&gt;/config.json</code> in this example) needs to be passed to the container:</p>
</blockquote> </blockquote>
<pre><code class="bash">docker run [...] -v &lt;PATH&gt;/config.json:/config.json containrrr/watchtower <div class="codehilite"><pre><span></span><code>docker run <span class="o">[</span>...<span class="o">]</span> -v &lt;PATH&gt;/config.json:/config.json containrrr/watchtower
</code></pre> </code></pre></div>
<h3 id="share_the_docker_configuration_file">Share the Docker configuration file<a class="headerlink" href="#share_the_docker_configuration_file" title="Permanent link">&para;</a></h3> <h3 id="share_the_docker_configuration_file">Share the Docker configuration file<a class="headerlink" href="#share_the_docker_configuration_file" title="Permanent link">&para;</a></h3>
<p>To pull an image from a private registry, <code>docker login</code> needs to be called first, to get access <p>To pull an image from a private registry, <code>docker login</code> needs to be called first, to get access
@ -420,34 +425,34 @@ to the registry. The provided credentials are stored in a configuration file cal
This configuration file can be directly used by watchtower. In this case, the creation of an This configuration file can be directly used by watchtower. In this case, the creation of an
additional configuration file is not necessary.</p> additional configuration file is not necessary.</p>
<p>When the Docker container is started, pass the configuration file to watchtower:</p> <p>When the Docker container is started, pass the configuration file to watchtower:</p>
<pre><code class="bash">docker run [...] -v &lt;PATH_TO_HOME_DIR&gt;/.docker/config.json:/config.json containrrr/watchtower <div class="codehilite"><pre><span></span><code>docker run <span class="o">[</span>...<span class="o">]</span> -v &lt;PATH_TO_HOME_DIR&gt;/.docker/config.json:/config.json containrrr/watchtower
</code></pre> </code></pre></div>
<p>When creating the watchtower container via docker-compose, use the following lines:</p> <p>When creating the watchtower container via docker-compose, use the following lines:</p>
<pre><code class="yaml">version: &quot;3.4&quot; <div class="codehilite"><pre><span></span><code><span class="nt">version</span><span class="p">:</span> <span class="s">&quot;3.4&quot;</span>
services: <span class="nt">services</span><span class="p">:</span>
watchtower: <span class="nt">watchtower</span><span class="p">:</span>
image: index.docker.io/containrrr/watchtower:latest <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">index.docker.io/containrrr/watchtower:latest</span>
volumes: <span class="nt">volumes</span><span class="p">:</span>
- /var/run/docker.sock:/var/run/docker.sock <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/var/run/docker.sock:/var/run/docker.sock</span>
- &lt;PATH_TO_HOME_DIR&gt;/.docker/config.json:/config.json <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">&lt;PATH_TO_HOME_DIR&gt;/.docker/config.json:/config.json</span>
... <span class="l l-Scalar l-Scalar-Plain">...</span>
</code></pre> </code></pre></div>
<h4 id="docker_config_path">Docker Config path<a class="headerlink" href="#docker_config_path" title="Permanent link">&para;</a></h4> <h4 id="docker_config_path">Docker Config path<a class="headerlink" href="#docker_config_path" title="Permanent link">&para;</a></h4>
<p>By default, watchtower will look for the <code>config.json</code> file in <code>/</code>, but this can be changed by setting the <code>DOCKER_CONFIG</code> environment variable to the directory path where your config is located. This is useful for setups where the config.json file is changed while the watchtower instance is running, as the changes will not be picked up for a mounted file if the inode changes. <p>By default, watchtower will look for the <code>config.json</code> file in <code>/</code>, but this can be changed by setting the <code>DOCKER_CONFIG</code> environment variable to the directory path where your config is located. This is useful for setups where the config.json file is changed while the watchtower instance is running, as the changes will not be picked up for a mounted file if the inode changes.
Example usage:</p> Example usage:</p>
<pre><code class="yaml">version: &quot;3.4&quot; <div class="codehilite"><pre><span></span><code><span class="nt">version</span><span class="p">:</span> <span class="s">&quot;3.4&quot;</span>
services: <span class="nt">services</span><span class="p">:</span>
watchtower: <span class="nt">watchtower</span><span class="p">:</span>
image: containrrr/watchtower <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">containrrr/watchtower</span>
environment: <span class="nt">environment</span><span class="p">:</span>
DOCKER_CONFIG: /config <span class="nt">DOCKER_CONFIG</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">/config</span>
volumes: <span class="nt">volumes</span><span class="p">:</span>
- /etc/watchtower/config/:/config/ <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/etc/watchtower/config/:/config/</span>
- /var/run/docker.sock:/var/run/docker.sock <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/var/run/docker.sock:/var/run/docker.sock</span>
</code></pre> </code></pre></div>
<h2 id="credential_helpers">Credential helpers<a class="headerlink" href="#credential_helpers" title="Permanent link">&para;</a></h2> <h2 id="credential_helpers">Credential helpers<a class="headerlink" href="#credential_helpers" title="Permanent link">&para;</a></h2>
<p>Some private Docker registries (the most prominent probably being AWS ECR) use non-standard ways of authentication. <p>Some private Docker registries (the most prominent probably being AWS ECR) use non-standard ways of authentication.
@ -461,21 +466,21 @@ in a volume that may be mounted onto your watchtower container.</p>
<ol> <ol>
<li>Create the Dockerfile (contents below): </li> <li>Create the Dockerfile (contents below): </li>
</ol> </ol>
<pre><code class="Dockerfile">FROM golang:latest <div class="codehilite"><pre><span></span><code><span class="k">FROM</span> <span class="s">golang:latest</span>
ENV CGO_ENABLED 0 <span class="k">ENV</span> CGO_ENABLED <span class="m">0</span>
ENV REPO github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login <span class="k">ENV</span> REPO github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
RUN go get -u $REPO <span class="k">RUN</span> go get -u <span class="nv">$REPO</span>
RUN rm /go/bin/docker-credential-ecr-login <span class="k">RUN</span> rm /go/bin/docker-credential-ecr-login
RUN go build \ <span class="k">RUN</span> go build <span class="se">\</span>
-o /go/bin/docker-credential-ecr-login \ -o /go/bin/docker-credential-ecr-login <span class="se">\</span>
/go/src/$REPO /go/src/<span class="nv">$REPO</span>
WORKDIR /go/bin/ <span class="k">WORKDIR</span><span class="s"> /go/bin/</span>
</code></pre> </code></pre></div>
<ol> <ol>
<li>Use the following commands to build the aws-ecr-dock-cred-helper and store it's output in a volume:</li> <li>Use the following commands to build the aws-ecr-dock-cred-helper and store it's output in a volume:</li>
@ -487,47 +492,46 @@ WORKDIR /go/bin/
<p>docker build -t aws-ecr-dock-cred-helper .</p> <p>docker build -t aws-ecr-dock-cred-helper .</p>
<h1 id="build_the_command_and_store_it_in_the_new_volume_in_the_gobin_directory">Build the command and store it in the new volume in the /go/bin directory.<a class="headerlink" href="#build_the_command_and_store_it_in_the_new_volume_in_the_gobin_directory" title="Permanent link">&para;</a></h1> <h1 id="build_the_command_and_store_it_in_the_new_volume_in_the_gobin_directory">Build the command and store it in the new volume in the /go/bin directory.<a class="headerlink" href="#build_the_command_and_store_it_in_the_new_volume_in_the_gobin_directory" title="Permanent link">&para;</a></h1>
<p>docker run -d --rm --name aws-cred-helper --volume helper:/go/bin aws-ecr-dock-cred-helper</p> <p>docker run -d --rm --name aws-cred-helper --volume helper:/go/bin aws-ecr-dock-cred-helper</p>
<pre><code> <div class="codehilite"><pre><span></span><code><span class="mi">3</span><span class="p">.</span> <span class="k">Create</span> <span class="n">a</span> <span class="n">configuration</span> <span class="n">file</span> <span class="k">for</span> <span class="n">docker</span><span class="p">,</span> <span class="k">and</span> <span class="n">store</span> <span class="n">it</span> <span class="k">in</span> <span class="err">$</span><span class="n">HOME</span><span class="o">/</span><span class="p">.</span><span class="n">docker</span><span class="o">/</span><span class="n">config</span><span class="p">.</span><span class="n">json</span> <span class="p">(</span><span class="k">replace</span> <span class="n">the</span> <span class="o">&lt;</span><span class="n">AWS_ACCOUNT_ID</span><span class="o">&gt;</span>
3. Create a configuration file for docker, and store it in $HOME/.docker/config.json (replace the &lt;AWS_ACCOUNT_ID&gt; <span class="n">placeholders</span> <span class="k">with</span> <span class="n">your</span> <span class="n">AWS</span> <span class="n">Account</span> <span class="n">ID</span><span class="p">):</span>
placeholders with your AWS Account ID):
<span class="o">```</span><span class="n">json</span>
```json <span class="err">{</span>
{ <span class="ss">&quot;credsStore&quot;</span> <span class="p">:</span> <span class="ss">&quot;ecr-login&quot;</span><span class="p">,</span>
&quot;credsStore&quot; : &quot;ecr-login&quot;, <span class="ss">&quot;HttpHeaders&quot;</span> <span class="p">:</span> <span class="err">{</span>
&quot;HttpHeaders&quot; : { <span class="ss">&quot;User-Agent&quot;</span> <span class="p">:</span> <span class="ss">&quot;Docker-Client/19.03.1 (XXXXXX)&quot;</span>
&quot;User-Agent&quot; : &quot;Docker-Client/19.03.1 (XXXXXX)&quot; <span class="err">}</span><span class="p">,</span>
}, <span class="ss">&quot;auths&quot;</span> <span class="p">:</span> <span class="err">{</span>
&quot;auths&quot; : { <span class="ss">&quot;&lt;AWS_ACCOUNT_ID&gt;.dkr.ecr.us-west-1.amazonaws.com&quot;</span> <span class="p">:</span> <span class="err">{}</span>
&quot;&lt;AWS_ACCOUNT_ID&gt;.dkr.ecr.us-west-1.amazonaws.com&quot; : {} <span class="err">}</span><span class="p">,</span>
}, <span class="ss">&quot;credHelpers&quot;</span><span class="p">:</span> <span class="err">{</span>
&quot;credHelpers&quot;: { <span class="ss">&quot;&lt;AWS_ACCOUNT_ID&gt;.dkr.ecr.us-west-1.amazonaws.com&quot;</span> <span class="p">:</span> <span class="ss">&quot;ecr-login&quot;</span>
&quot;&lt;AWS_ACCOUNT_ID&gt;.dkr.ecr.us-west-1.amazonaws.com&quot; : &quot;ecr-login&quot; <span class="err">}</span>
} <span class="err">}</span>
} </code></pre></div>
</code></pre>
<ol> <ol>
<li>Create a docker-compose file (as an example) to help launch the container:</li> <li>Create a docker-compose file (as an example) to help launch the container:</li>
</ol> </ol>
<p>and the docker-compose definition:</p> <p>and the docker-compose definition:</p>
<pre><code class="yaml">version: &quot;3.4&quot; <div class="codehilite"><pre><span></span><code><span class="nt">version</span><span class="p">:</span> <span class="s">&quot;3.4&quot;</span>
services: <span class="nt">services</span><span class="p">:</span>
# Check for new images and restart things if a new image exists <span class="c1"># Check for new images and restart things if a new image exists</span>
# for any of our containers. <span class="c1"># for any of our containers.</span>
watchtower: <span class="nt">watchtower</span><span class="p">:</span>
image: containrrr/watchtower:latest <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">containrrr/watchtower:latest</span>
volumes: <span class="nt">volumes</span><span class="p">:</span>
- /var/run/docker.sock:/var/run/docker.sock <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/var/run/docker.sock:/var/run/docker.sock</span>
- .docker/config.json:/config.json <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">.docker/config.json:/config.json</span>
- helper:/go/bin <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">helper:/go/bin</span>
environment: <span class="nt">environment</span><span class="p">:</span>
- HOME=/ <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">HOME=/</span>
- PATH=$PATH:/go/bin <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PATH=$PATH:/go/bin</span>
- AWS_REGION=us-west-1 <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">AWS_REGION=us-west-1</span>
volumes: <span class="nt">volumes</span><span class="p">:</span>
helper: <span class="nt">helper</span><span class="p">:</span>
external: true <span class="nt">external</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span>
</code></pre> </code></pre></div>
<p>A few additional notes:</p> <p>A few additional notes:</p>
<ol> <ol>
@ -558,7 +562,7 @@ volumes:
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../container-selection/" title="Container selection" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../container-selection/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -573,7 +577,7 @@ volumes:
</a> </a>
<a href="../linked-containers/" title="Linked containers" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../linked-containers/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -606,8 +610,8 @@ volumes:
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/remote-hosts/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/remote-hosts/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -62,12 +65,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -96,7 +100,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -147,12 +151,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -179,7 +184,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -191,7 +196,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -203,7 +208,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -215,7 +220,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -227,7 +232,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -239,7 +244,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -251,7 +256,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -263,7 +268,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -281,7 +286,7 @@
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<a href="./" title="Remote hosts" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Remote hosts Remote hosts
</a> </a>
@ -294,7 +299,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -306,7 +311,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -318,7 +323,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -330,7 +335,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -356,17 +361,17 @@
<h1>Remote hosts</h1> <h1>Remote hosts</h1>
<p>By default, watchtower is set-up to monitor the local Docker daemon (the same daemon running the watchtower container itself). However, it is possible to configure watchtower to monitor a remote Docker endpoint. When starting the watchtower container you can specify a remote Docker endpoint with either the <code>--host</code> flag or the <code>DOCKER_HOST</code> environment variable:</p> <p>By default, watchtower is set-up to monitor the local Docker daemon (the same daemon running the watchtower container itself). However, it is possible to configure watchtower to monitor a remote Docker endpoint. When starting the watchtower container you can specify a remote Docker endpoint with either the <code>--host</code> flag or the <code>DOCKER_HOST</code> environment variable:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
containrrr/watchtower --host &quot;tcp://10.0.1.2:2375&quot; containrrr/watchtower --host <span class="s2">&quot;tcp://10.0.1.2:2375&quot;</span>
</code></pre> </code></pre></div>
<p>or</p> <p>or</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-e DOCKER_HOST=&quot;tcp://10.0.1.2:2375&quot; \ -e <span class="nv">DOCKER_HOST</span><span class="o">=</span><span class="s2">&quot;tcp://10.0.1.2:2375&quot;</span> <span class="se">\</span>
containrrr/watchtower containrrr/watchtower
</code></pre> </code></pre></div>
<p>Note in both of the examples above that it is unnecessary to mount the <em>/var/run/docker.sock</em> into the watchtower container.</p> <p>Note in both of the examples above that it is unnecessary to mount the <em>/var/run/docker.sock</em> into the watchtower container.</p>
@ -387,7 +392,7 @@
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../linked-containers/" title="Linked containers" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../linked-containers/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -402,7 +407,7 @@
</a> </a>
<a href="../secure-connections/" title="Secure connections" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../secure-connections/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -435,8 +440,8 @@
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/running-multiple-instances/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/running-multiple-instances/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -62,12 +65,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -96,7 +100,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -147,12 +151,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -179,7 +184,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -191,7 +196,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -203,7 +208,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -215,7 +220,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -227,7 +232,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -239,7 +244,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -251,7 +256,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -263,7 +268,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -275,7 +280,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -287,7 +292,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -299,7 +304,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -311,7 +316,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -329,7 +334,7 @@
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<a href="./" title="Running multiple instances" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Running multiple instances Running multiple instances
</a> </a>
@ -361,22 +366,22 @@
- An instance without a scope will clean up other running instances, even if they have a defined scope;</p> - An instance without a scope will clean up other running instances, even if they have a defined scope;</p>
<p>To define an instance monitoring scope, use the <code>--scope</code> argument or the <code>WATCHTOWER_SCOPE</code> environment variable on startup and set the <em>com.centurylinklabs.watchtower.scope</em> label with the same value for the containers you want to include in this instance's scope (including the instance itself).</p> <p>To define an instance monitoring scope, use the <code>--scope</code> argument or the <code>WATCHTOWER_SCOPE</code> environment variable on startup and set the <em>com.centurylinklabs.watchtower.scope</em> label with the same value for the containers you want to include in this instance's scope (including the instance itself).</p>
<p>For example, in a Docker Compose config file:</p> <p>For example, in a Docker Compose config file:</p>
<pre><code class="json">version: '3' <div class="codehilite"><pre><span></span><code><span class="nt">version</span><span class="p">:</span> <span class="s">&#39;3&#39;</span>
services: <span class="nt">services</span><span class="p">:</span>
app-monitored-by-watchtower: <span class="nt">app-monitored-by-watchtower</span><span class="p">:</span>
image: myapps/monitored-by-watchtower <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">myapps/monitored-by-watchtower</span>
labels: <span class="nt">labels</span><span class="p">:</span>
- &quot;com.centurylinklabs.watchtower.scope=myscope&quot; <span class="p p-Indicator">-</span> <span class="s">&quot;com.centurylinklabs.watchtower.scope=myscope&quot;</span>
watchtower: <span class="nt">watchtower</span><span class="p">:</span>
image: containrrr/watchtower <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">containrrr/watchtower</span>
volumes: <span class="nt">volumes</span><span class="p">:</span>
- /var/run/docker.sock:/var/run/docker.sock <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/var/run/docker.sock:/var/run/docker.sock</span>
command: --interval 30 --scope myscope <span class="nt">command</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">--interval 30 --scope myscope</span>
labels: <span class="nt">labels</span><span class="p">:</span>
- &quot;com.centurylinklabs.watchtower.scope=myscope&quot; <span class="p p-Indicator">-</span> <span class="s">&quot;com.centurylinklabs.watchtower.scope=myscope&quot;</span>
</code></pre> </code></pre></div>
@ -395,7 +400,7 @@ services:
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../lifecycle-hooks/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -429,8 +434,8 @@ services:
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

File diff suppressed because one or more lines are too long

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/secure-connections/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/secure-connections/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -62,12 +65,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -96,7 +100,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -147,12 +151,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -179,7 +184,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -191,7 +196,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -203,7 +208,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -215,7 +220,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -227,7 +232,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -239,7 +244,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -251,7 +256,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -263,7 +268,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -275,7 +280,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -293,7 +298,7 @@
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<a href="./" title="Secure connections" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Secure connections Secure connections
</a> </a>
@ -306,7 +311,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -318,7 +323,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -330,7 +335,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -358,13 +363,13 @@
<p>Watchtower is also capable of connecting to Docker endpoints which are protected by SSL/TLS. If you've used <em>docker-machine</em> to provision your remote Docker host, you simply need to volume mount the certificates generated by <em>docker-machine</em> into the watchtower container and optionally specify <code>--tlsverify</code> flag.</p> <p>Watchtower is also capable of connecting to Docker endpoints which are protected by SSL/TLS. If you've used <em>docker-machine</em> to provision your remote Docker host, you simply need to volume mount the certificates generated by <em>docker-machine</em> into the watchtower container and optionally specify <code>--tlsverify</code> flag.</p>
<p>The <em>docker-machine</em> certificates for a particular host can be located by executing the <code>docker-machine env</code> command for the desired host (note the values for the <code>DOCKER_HOST</code> and <code>DOCKER_CERT_PATH</code> environment variables that are returned from this command). The directory containing the certificates for the remote host needs to be mounted into the watchtower container at <em>/etc/ssl/docker</em>.</p> <p>The <em>docker-machine</em> certificates for a particular host can be located by executing the <code>docker-machine env</code> command for the desired host (note the values for the <code>DOCKER_HOST</code> and <code>DOCKER_CERT_PATH</code> environment variables that are returned from this command). The directory containing the certificates for the remote host needs to be mounted into the watchtower container at <em>/etc/ssl/docker</em>.</p>
<p>With the certificates mounted into the watchtower container you need to specify the <code>--tlsverify</code> flag to enable verification of the certificate:</p> <p>With the certificates mounted into the watchtower container you need to specify the <code>--tlsverify</code> flag to enable verification of the certificate:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-e DOCKER_HOST=$DOCKER_HOST \ -e <span class="nv">DOCKER_HOST</span><span class="o">=</span><span class="nv">$DOCKER_HOST</span> <span class="se">\</span>
-e DOCKER_CERT_PATH=/etc/ssl/docker \ -e <span class="nv">DOCKER_CERT_PATH</span><span class="o">=</span>/etc/ssl/docker <span class="se">\</span>
-v $DOCKER_CERT_PATH:/etc/ssl/docker \ -v <span class="nv">$DOCKER_CERT_PATH</span>:/etc/ssl/docker <span class="se">\</span>
containrrr/watchtower --tlsverify containrrr/watchtower --tlsverify
</code></pre> </code></pre></div>
@ -383,7 +388,7 @@
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../remote-hosts/" title="Remote hosts" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../remote-hosts/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -398,7 +403,7 @@
</a> </a>
<a href="../stop-signals/" title="Stop signals" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../stop-signals/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -431,8 +436,8 @@
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -1,55 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
<loc>http://containrrr.github.io/watchtower/</loc> <loc>http://containrrr.github.io/watchtower/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/introduction/</loc> <loc>http://containrrr.github.io/watchtower/introduction/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/usage-overview/</loc> <loc>http://containrrr.github.io/watchtower/usage-overview/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/arguments/</loc> <loc>http://containrrr.github.io/watchtower/arguments/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/notifications/</loc> <loc>http://containrrr.github.io/watchtower/notifications/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/container-selection/</loc> <loc>http://containrrr.github.io/watchtower/container-selection/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/private-registries/</loc> <loc>http://containrrr.github.io/watchtower/private-registries/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/linked-containers/</loc> <loc>http://containrrr.github.io/watchtower/linked-containers/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/remote-hosts/</loc> <loc>http://containrrr.github.io/watchtower/remote-hosts/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/secure-connections/</loc> <loc>http://containrrr.github.io/watchtower/secure-connections/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/stop-signals/</loc> <loc>http://containrrr.github.io/watchtower/stop-signals/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/lifecycle-hooks/</loc> <loc>http://containrrr.github.io/watchtower/lifecycle-hooks/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>http://containrrr.github.io/watchtower/running-multiple-instances/</loc> <loc>http://containrrr.github.io/watchtower/running-multiple-instances/</loc>
<lastmod>2020-10-03</lastmod> <lastmod>2020-12-20</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
</urlset> </urlset>

Binary file not shown.

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/stop-signals/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/stop-signals/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -62,12 +65,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -96,7 +100,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -147,12 +151,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -179,7 +184,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -191,7 +196,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -203,7 +208,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link"> <a href="../usage-overview/" class="md-nav__link">
Usage overview Usage overview
</a> </a>
</li> </li>
@ -215,7 +220,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -227,7 +232,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -239,7 +244,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -251,7 +256,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -263,7 +268,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -275,7 +280,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -287,7 +292,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -305,7 +310,7 @@
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<a href="./" title="Stop signals" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Stop signals Stop signals
</a> </a>
@ -318,7 +323,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -330,7 +335,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -358,12 +363,12 @@
<p>When watchtower detects that a running container needs to be updated it will stop the container by sending it a SIGTERM signal. <p>When watchtower detects that a running container needs to be updated it will stop the container by sending it a SIGTERM signal.
If your container should be shutdown with a different signal you can communicate this to watchtower by setting a label named <em>com.centurylinklabs.watchtower.stop-signal</em> with the value of the desired signal.</p> If your container should be shutdown with a different signal you can communicate this to watchtower by setting a label named <em>com.centurylinklabs.watchtower.stop-signal</em> with the value of the desired signal.</p>
<p>This label can be coded directly into your image by using the <code>LABEL</code> instruction in your Dockerfile:</p> <p>This label can be coded directly into your image by using the <code>LABEL</code> instruction in your Dockerfile:</p>
<pre><code class="docker">LABEL com.centurylinklabs.watchtower.stop-signal=&quot;SIGHUP&quot; <div class="codehilite"><pre><span></span><code><span class="k">LABEL</span> com.centurylinklabs.watchtower.stop-signal<span class="o">=</span><span class="s2">&quot;SIGHUP&quot;</span>
</code></pre> </code></pre></div>
<p>Or, it can be specified as part of the <code>docker run</code> command line:</p> <p>Or, it can be specified as part of the <code>docker run</code> command line:</p>
<pre><code class="bash">docker run -d --label=com.centurylinklabs.watchtower.stop-signal=SIGHUP someimage <div class="codehilite"><pre><span></span><code>docker run -d --label<span class="o">=</span>com.centurylinklabs.watchtower.stop-signal<span class="o">=</span>SIGHUP someimage
</code></pre> </code></pre></div>
@ -382,7 +387,7 @@ If your container should be shutdown with a different signal you can communicate
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../secure-connections/" title="Secure connections" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../secure-connections/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -397,7 +402,7 @@ If your container should be shutdown with a different signal you can communicate
</a> </a>
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../lifecycle-hooks/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -430,8 +435,8 @@ If your container should be shutdown with a different signal you can communicate
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

@ -0,0 +1,16 @@
[data-md-color-scheme="containrrr"] {
--md-primary-fg-color: #406170;
--md-primary-fg-color--light:#acbfc7;
--md-primary-fg-color--dark: #003343;
--md-accent-fg-color: #003343;
--md-accent-fg-color--transparent: #00334310;
}
.md-header-nav__button.md-logo {
padding: 0;
}
.md-header-nav__button.md-logo img {
width: 1.6rem;
height: 1.6rem;
}

@ -7,11 +7,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="http://containrrr.github.io/watchtower/usage-overview/"> <link rel="canonical" href="http://containrrr.github.io/watchtower/usage-overview/">
<link rel="shortcut icon" href="../assets/images/favicon.png"> <link rel="shortcut icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1"> <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
@ -19,10 +20,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.38780c08.min.css"> <link rel="stylesheet" href="../assets/stylesheets/main.19753c6b.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f72e892.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.196e0c26.min.css">
@ -37,6 +38,8 @@
<link rel="stylesheet" href="../stylesheets/theme.css">
@ -49,7 +52,7 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none"> <body dir="ltr" data-md-color-scheme="containrrr" data-md-color-primary="" data-md-color-accent="">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
@ -62,12 +65,13 @@
</div> </div>
<header class="md-header" data-md-component="header"> <header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="Header"> <nav class="md-header-nav md-grid" aria-label="Header">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
<label class="md-header-nav__button md-icon" for="__drawer"> <label class="md-header-nav__button md-icon" for="__drawer">
@ -96,7 +100,7 @@
<label class="md-search__overlay" for="__search"></label> <label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search"> <form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search"> <label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
@ -147,12 +151,13 @@
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap"> <div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower"> <a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo" aria-label="Watchtower">
<img src="../images/logo-450px.png" alt="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
</a> </a>
Watchtower Watchtower
@ -179,7 +184,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link"> <a href=".." class="md-nav__link">
Home Home
</a> </a>
</li> </li>
@ -191,7 +196,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link"> <a href="../introduction/" class="md-nav__link">
Introduction Introduction
</a> </a>
</li> </li>
@ -209,7 +214,7 @@
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<a href="./" title="Usage overview" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
Usage overview Usage overview
</a> </a>
@ -222,7 +227,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link"> <a href="../arguments/" class="md-nav__link">
Arguments Arguments
</a> </a>
</li> </li>
@ -234,7 +239,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link"> <a href="../notifications/" class="md-nav__link">
Notifications Notifications
</a> </a>
</li> </li>
@ -246,7 +251,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link"> <a href="../container-selection/" class="md-nav__link">
Container selection Container selection
</a> </a>
</li> </li>
@ -258,7 +263,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../private-registries/" title="Private registries" class="md-nav__link"> <a href="../private-registries/" class="md-nav__link">
Private registries Private registries
</a> </a>
</li> </li>
@ -270,7 +275,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link"> <a href="../linked-containers/" class="md-nav__link">
Linked containers Linked containers
</a> </a>
</li> </li>
@ -282,7 +287,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link"> <a href="../remote-hosts/" class="md-nav__link">
Remote hosts Remote hosts
</a> </a>
</li> </li>
@ -294,7 +299,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link"> <a href="../secure-connections/" class="md-nav__link">
Secure connections Secure connections
</a> </a>
</li> </li>
@ -306,7 +311,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link"> <a href="../stop-signals/" class="md-nav__link">
Stop signals Stop signals
</a> </a>
</li> </li>
@ -318,7 +323,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../lifecycle-hooks/" title="Lifecycle hooks" class="md-nav__link"> <a href="../lifecycle-hooks/" class="md-nav__link">
Lifecycle hooks Lifecycle hooks
</a> </a>
</li> </li>
@ -330,7 +335,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../running-multiple-instances/" title="Running multiple instances" class="md-nav__link"> <a href="../running-multiple-instances/" class="md-nav__link">
Running multiple instances Running multiple instances
</a> </a>
</li> </li>
@ -358,50 +363,50 @@
<p>Watchtower is itself packaged as a Docker container so installation is as simple as pulling the <code>containrrr/watchtower</code> image. If you are using ARM based architecture, pull the appropriate <code>containrrr/watchtower:armhf-&lt;tag&gt;</code> image from the <a href="https://hub.docker.com/r/containrrr/watchtower/tags/">containrrr Docker Hub</a>.</p> <p>Watchtower is itself packaged as a Docker container so installation is as simple as pulling the <code>containrrr/watchtower</code> image. If you are using ARM based architecture, pull the appropriate <code>containrrr/watchtower:armhf-&lt;tag&gt;</code> image from the <a href="https://hub.docker.com/r/containrrr/watchtower/tags/">containrrr Docker Hub</a>.</p>
<p>Since the watchtower code needs to interact with the Docker API in order to monitor the running containers, you need to mount <em>/var/run/docker.sock</em> into the container with the <code>-v</code> flag when you run it.</p> <p>Since the watchtower code needs to interact with the Docker API in order to monitor the running containers, you need to mount <em>/var/run/docker.sock</em> into the container with the <code>-v</code> flag when you run it.</p>
<p>Run the <code>watchtower</code> container with the following command:</p> <p>Run the <code>watchtower</code> container with the following command:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
containrrr/watchtower containrrr/watchtower
</code></pre> </code></pre></div>
<p>If pulling images from private Docker registries, supply registry authentication credentials with the environment variables <code>REPO_USER</code> and <code>REPO_PASS</code> <p>If pulling images from private Docker registries, supply registry authentication credentials with the environment variables <code>REPO_USER</code> and <code>REPO_PASS</code>
or by mounting the host's docker config file into the container (at the root of the container filesystem <code>/</code>).</p> or by mounting the host's docker config file into the container (at the root of the container filesystem <code>/</code>).</p>
<p>Passing environment variables:</p> <p>Passing environment variables:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-e REPO_USER=username \ -e <span class="nv">REPO_USER</span><span class="o">=</span>username <span class="se">\</span>
-e REPO_PASS=password \ -e <span class="nv">REPO_PASS</span><span class="o">=</span>password <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
containrrr/watchtower container_to_watch --debug containrrr/watchtower container_to_watch --debug
</code></pre> </code></pre></div>
<p>Also check out <a href="https://stackoverflow.com/a/30494145/7872793">this Stack Overflow answer</a> for more options on how to pass environment variables.</p> <p>Also check out <a href="https://stackoverflow.com/a/30494145/7872793">this Stack Overflow answer</a> for more options on how to pass environment variables.</p>
<p>Mounting the host's docker config file:</p> <p>Mounting the host's docker config file:</p>
<pre><code class="bash">docker run -d \ <div class="codehilite"><pre><span></span><code>docker run -d <span class="se">\</span>
--name watchtower \ --name watchtower <span class="se">\</span>
-v /home/&lt;user&gt;/.docker/config.json:/config.json \ -v /home/&lt;user&gt;/.docker/config.json:/config.json <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
containrrr/watchtower container_to_watch --debug containrrr/watchtower container_to_watch --debug
</code></pre> </code></pre></div>
<blockquote> <blockquote>
<p>NOTE: if you mount <code>config.json</code> in the manner above, changes from the host system will (generally) not be propagated to the running container. Mounting files into the Docker daemon uses bind mounts, which are based on inodes. Most applications (including <code>docker login</code> and <code>vim</code>) will not directly edit the file, but instead make a copy and replace the original file, which results in a new inode which in turn <em>breaks</em> the bind mount. <strong>As a workaround</strong>, you can create a symlink to your <code>config.json</code> file and then mount the symlink in the container. The symlinked file will always have the same inode, which keeps the bind mount intact and will ensure changes to the original file are propagated to the running container (regardless of the inode of the source file!).</p> <p>NOTE: if you mount <code>config.json</code> in the manner above, changes from the host system will (generally) not be propagated to the running container. Mounting files into the Docker daemon uses bind mounts, which are based on inodes. Most applications (including <code>docker login</code> and <code>vim</code>) will not directly edit the file, but instead make a copy and replace the original file, which results in a new inode which in turn <em>breaks</em> the bind mount. <strong>As a workaround</strong>, you can create a symlink to your <code>config.json</code> file and then mount the symlink in the container. The symlinked file will always have the same inode, which keeps the bind mount intact and will ensure changes to the original file are propagated to the running container (regardless of the inode of the source file!).</p>
</blockquote> </blockquote>
<p>If you mount the config file as described above, be sure to also prepend the URL for the registry when starting up your watched image (you can omit the https://). Here is a complete docker-compose.yml file that starts up a docker container from a private repo at Docker Hub and monitors it with watchtower. Note the command argument changing the interval to 30s rather than the default 5 minutes.</p> <p>If you mount the config file as described above, be sure to also prepend the URL for the registry when starting up your watched image (you can omit the https://). Here is a complete docker-compose.yml file that starts up a docker container from a private repo at Docker Hub and monitors it with watchtower. Note the command argument changing the interval to 30s rather than the default 5 minutes.</p>
<pre><code class="json">version: &quot;3&quot; <div class="codehilite"><pre><span></span><code><span class="nt">version</span><span class="p">:</span> <span class="s">&quot;3&quot;</span>
services: <span class="nt">services</span><span class="p">:</span>
cavo: <span class="nt">cavo</span><span class="p">:</span>
image: index.docker.io/&lt;org&gt;/&lt;image&gt;:&lt;tag&gt; <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">index.docker.io/&lt;org&gt;/&lt;image&gt;:&lt;tag&gt;</span>
ports: <span class="nt">ports</span><span class="p">:</span>
- &quot;443:3443&quot; <span class="p p-Indicator">-</span> <span class="s">&quot;443:3443&quot;</span>
- &quot;80:3080&quot; <span class="p p-Indicator">-</span> <span class="s">&quot;80:3080&quot;</span>
watchtower: <span class="nt">watchtower</span><span class="p">:</span>
image: containrrr/watchtower <span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">containrrr/watchtower</span>
volumes: <span class="nt">volumes</span><span class="p">:</span>
- /var/run/docker.sock:/var/run/docker.sock <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/var/run/docker.sock:/var/run/docker.sock</span>
- /root/.docker/config.json:/config.json <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/root/.docker/config.json:/config.json</span>
command: --interval 30 <span class="nt">command</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">--interval 30</span>
</code></pre> </code></pre></div>
@ -420,7 +425,7 @@ services:
<div class="md-footer-nav"> <div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer"> <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../introduction/" title="Introduction" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> <a href="../introduction/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon"> <div class="md-footer-nav__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div> </div>
@ -435,7 +440,7 @@ services:
</a> </a>
<a href="../arguments/" title="Arguments" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> <a href="../arguments/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title"> <div class="md-footer-nav__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer-nav__direction"> <span class="md-footer-nav__direction">
@ -468,8 +473,8 @@ services:
</div> </div>
<script src="../assets/javascripts/vendor.77e55a48.min.js"></script> <script src="../assets/javascripts/vendor.0ac82a11.min.js"></script>
<script src="../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> <script src="../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
<script> <script>
app = initialize({ app = initialize({

Loading…
Cancel
Save