Deployed 1b3db5e with MkDocs version: 1.0.4

pull/763/head
5 years ago
parent 5c39db873d
commit 82de4c9147

@ -32,7 +32,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="/watchtower/assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -40,7 +40,7 @@
<link rel="stylesheet" href="/watchtower/assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="/watchtower/assets/stylesheets/application.30686662.css">
@ -165,7 +165,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -281,6 +281,18 @@
<li class="md-nav__item">
<a href="/watchtower/credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="/watchtower/linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
@ -367,7 +379,7 @@
</div>
<script src="/watchtower/assets/javascripts/application.245445c6.js"></script>
<script src="/watchtower/assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"/watchtower/"}})</script>

@ -34,7 +34,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -42,7 +42,7 @@
<link rel="stylesheet" href="../assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
@ -171,7 +171,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -275,91 +275,105 @@
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#help" title="Help" class="md-nav__link">
<a href="#help" class="md-nav__link">
Help
</a>
</li>
<li class="md-nav__item">
<a href="#cleanup" title="Cleanup" class="md-nav__link">
<a href="#cleanup" class="md-nav__link">
Cleanup
</a>
</li>
<li class="md-nav__item">
<a href="#debug" title="Debug" class="md-nav__link">
<a href="#remove_attached_volumes" class="md-nav__link">
Remove attached volumes
</a>
</li>
<li class="md-nav__item">
<a href="#debug" class="md-nav__link">
Debug
</a>
</li>
<li class="md-nav__item">
<a href="#docker_host" title="Docker host" class="md-nav__link">
<a href="#docker_host" class="md-nav__link">
Docker host
</a>
</li>
<li class="md-nav__item">
<a href="#include_stopped" title="Include stopped" class="md-nav__link">
<a href="#docker_api_version" class="md-nav__link">
Docker API version
</a>
</li>
<li class="md-nav__item">
<a href="#include_stopped" class="md-nav__link">
Include stopped
</a>
</li>
<li class="md-nav__item">
<a href="#poll_interval" title="Poll Interval" class="md-nav__link">
Poll Interval
<a href="#poll_interval" class="md-nav__link">
Poll interval
</a>
</li>
<li class="md-nav__item">
<a href="#filter_by_enable_label" title="Filter by enable label" class="md-nav__link">
<a href="#filter_by_enable_label" class="md-nav__link">
Filter by enable label
</a>
</li>
<li class="md-nav__item">
<a href="#without_updating_containers" title="Without updating containers" class="md-nav__link">
<a href="#without_updating_containers" class="md-nav__link">
Without updating containers
</a>
</li>
<li class="md-nav__item">
<a href="#without_pulling_new_images" title="Without pulling new images" class="md-nav__link">
<a href="#without_pulling_new_images" class="md-nav__link">
Without pulling new images
</a>
</li>
<li class="md-nav__item">
<a href="#run_once" title="Run once" class="md-nav__link">
<a href="#run_once" class="md-nav__link">
Run once
</a>
</li>
<li class="md-nav__item">
<a href="#scheduling" title="Scheduling" class="md-nav__link">
<a href="#scheduling" class="md-nav__link">
Scheduling
</a>
</li>
<li class="md-nav__item">
<a href="#wait_until_timeout" title="Wait until timeout" class="md-nav__link">
<a href="#wait_until_timeout" class="md-nav__link">
Wait until timeout
</a>
</li>
<li class="md-nav__item">
<a href="#tls_verification" title="TLS Verification" class="md-nav__link">
<a href="#tls_verification" class="md-nav__link">
TLS Verification
</a>
@ -405,6 +419,18 @@
<li class="md-nav__item">
<a href="../credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
@ -467,91 +493,105 @@
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#help" title="Help" class="md-nav__link">
<a href="#help" class="md-nav__link">
Help
</a>
</li>
<li class="md-nav__item">
<a href="#cleanup" title="Cleanup" class="md-nav__link">
<a href="#cleanup" class="md-nav__link">
Cleanup
</a>
</li>
<li class="md-nav__item">
<a href="#debug" title="Debug" class="md-nav__link">
<a href="#remove_attached_volumes" class="md-nav__link">
Remove attached volumes
</a>
</li>
<li class="md-nav__item">
<a href="#debug" class="md-nav__link">
Debug
</a>
</li>
<li class="md-nav__item">
<a href="#docker_host" title="Docker host" class="md-nav__link">
<a href="#docker_host" class="md-nav__link">
Docker host
</a>
</li>
<li class="md-nav__item">
<a href="#include_stopped" title="Include stopped" class="md-nav__link">
<a href="#docker_api_version" class="md-nav__link">
Docker API version
</a>
</li>
<li class="md-nav__item">
<a href="#include_stopped" class="md-nav__link">
Include stopped
</a>
</li>
<li class="md-nav__item">
<a href="#poll_interval" title="Poll Interval" class="md-nav__link">
Poll Interval
<a href="#poll_interval" class="md-nav__link">
Poll interval
</a>
</li>
<li class="md-nav__item">
<a href="#filter_by_enable_label" title="Filter by enable label" class="md-nav__link">
<a href="#filter_by_enable_label" class="md-nav__link">
Filter by enable label
</a>
</li>
<li class="md-nav__item">
<a href="#without_updating_containers" title="Without updating containers" class="md-nav__link">
<a href="#without_updating_containers" class="md-nav__link">
Without updating containers
</a>
</li>
<li class="md-nav__item">
<a href="#without_pulling_new_images" title="Without pulling new images" class="md-nav__link">
<a href="#without_pulling_new_images" class="md-nav__link">
Without pulling new images
</a>
</li>
<li class="md-nav__item">
<a href="#run_once" title="Run once" class="md-nav__link">
<a href="#run_once" class="md-nav__link">
Run once
</a>
</li>
<li class="md-nav__item">
<a href="#scheduling" title="Scheduling" class="md-nav__link">
<a href="#scheduling" class="md-nav__link">
Scheduling
</a>
</li>
<li class="md-nav__item">
<a href="#wait_until_timeout" title="Wait until timeout" class="md-nav__link">
<a href="#wait_until_timeout" class="md-nav__link">
Wait until timeout
</a>
</li>
<li class="md-nav__item">
<a href="#tls_verification" title="TLS Verification" class="md-nav__link">
<a href="#tls_verification" class="md-nav__link">
TLS Verification
</a>
@ -590,8 +630,8 @@ launching watchtower.</p>
</code></pre>
<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 a run-once flag and remove
the watchtower container after it's execution.</p>
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>
<pre><code class="bash">$ docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
@ -599,7 +639,7 @@ the watchtower container after it's execution.</p>
nginx redis
</code></pre>
<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 "--rm" 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>
<h2 id="help">Help<a class="headerlink" href="#help" title="Permanent link">&para;</a></h2>
<p>Shows documentation about the supported flags.</p>
@ -617,6 +657,14 @@ Environment Variable: WATCHTOWER_CLEANUP
Default: false
</code></pre>
<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>
<pre><code> Argument: --remove-volumes
Environment Variable: WATCHTOWER_REMOVE_VOLUMES
Type: Boolean
Default: false
</code></pre>
<h2 id="debug">Debug<a class="headerlink" href="#debug" title="Permanent link">&para;</a></h2>
<p>Enable debug mode with verbose logging.</p>
<pre><code> Argument: --debug
@ -633,6 +681,14 @@ Environment Variable: DOCKER_HOST
Default: &quot;unix:///var/run/docker.sock&quot;
</code></pre>
<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>
<pre><code> Argument: --api-version, -a
Environment Variable: DOCKER_API_VERSION
Type: String
Default: &quot;1.24&quot;
</code></pre>
<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>
<pre><code> Argument: --include-stopped
@ -641,16 +697,16 @@ Environment Variable: WATCHTOWER_INCLUDE_STOPPED
Default: false
</code></pre>
<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.</p>
<pre><code> Argument: ---interval, -i
<pre><code> Argument: --interval, -i
Environment Variable: WATCHTOWER_POLL_INTERVAL
Type: Integer
Default: 300
</code></pre>
<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>Watch containers where the <code>com.centurylinklabs.watchtower.enable</code> label is 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
Environment Variable: WATCHTOWER_LABEL_ENABLE
Type: Boolean
@ -776,7 +832,7 @@ Environment Variable: DOCKER_TLS_VERIFY
</div>
<script src="../assets/javascripts/application.245445c6.js"></script>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -34,7 +34,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -42,7 +42,7 @@
<link rel="stylesheet" href="../assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
@ -167,7 +167,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -290,6 +290,18 @@
<li class="md-nav__item">
<a href="../credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
@ -359,7 +371,7 @@
<pre><code class="bash">docker run -d --label=com.centurylinklabs.watchtower.enable=false someimage
</code></pre>
<p>If you need to only include only some containers, pass the --label-enable flag on startup and set the <em>com.centurylinklabs.watchtower.enable</em> label with a value of true for the containers you want to watch.</p>
<p>If you need to include only some containers, pass the <code>--label-enable</code> flag 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;
</code></pre>
@ -401,13 +413,13 @@
</a>
<a href="../linked-containers/" title="Linked containers" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<a href="../credential-helpers/" title="Credential helpers" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
Linked containers
Credential helpers
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
@ -435,7 +447,7 @@
</div>
<script src="../assets/javascripts/application.245445c6.js"></script>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>

@ -0,0 +1,558 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="canonical" href="http://containrrr.github.io/watchtower/credential-helpers/">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="en">
<meta name="lang:search.pipeline.stopwords" content="True">
<meta name="lang:search.pipeline.trimmer" content="True">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
<title>Credential helpers - Watchtower</title>
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
<script src="../assets/javascripts/modernizr.74668098.js"></script>
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono&display=fallback">
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
<link rel="stylesheet" href="../assets/fonts/material-icons.css">
</head>
<body dir="ltr">
<svg class="md-svg">
<defs>
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="__github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#example" tabindex="1" class="md-skip">
Skip to content
</a>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo">
<i class="md-icon"></i>
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">
Watchtower
</span>
<span class="md-header-nav__topic">
Credential helpers
</span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/containrrr/watchtower/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo">
<i class="md-icon"></i>
</a>
Watchtower
</label>
<div class="md-nav__source">
<a href="https://github.com/containrrr/watchtower/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link">
Home
</a>
</li>
<li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link">
Introduction
</a>
</li>
<li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link">
Usage overview
</a>
</li>
<li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link">
Arguments
</a>
</li>
<li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link">
Notifications
</a>
</li>
<li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link">
Container selection
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
Credential helpers
</label>
<a href="./" title="Credential helpers" class="md-nav__link md-nav__link--active">
Credential helpers
</a>
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#example" class="md-nav__link">
Example
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
</a>
</li>
<li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link">
Remote hosts
</a>
</li>
<li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link">
Secure connections
</a>
</li>
<li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link">
Stop signals
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#example" class="md-nav__link">
Example
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<a href="https://github.com/containrrr/watchtower/edit/master/docs/credential-helpers.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a>
<h1>Credential helpers</h1>
<p>Some private docker registries (the most prominent probably being AWS ECR) use non-standard ways of authentication.
To be able to use this together with watchtower, we need to use a credential helper.</p>
<p>To keep the image size small we've decided to not include any helpers in the watchtower image, instead we'll put the
helper in a separate container and mount it using volumes.</p>
<h3 id="example">Example<a class="headerlink" href="#example" title="Permanent link">&para;</a></h3>
<p>Example implementation for use with <a href="https://github.com/awslabs/amazon-ecr-credential-helper">amazon-ecr-credential-helper</a>:</p>
<pre><code class="Dockerfile">FROM golang:latest
ENV CGO_ENABLED 0
ENV REPO github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
RUN go get -u $REPO
RUN rm /go/bin/docker-credential-ecr-login
RUN go build \
-o /go/bin/docker-credential-ecr-login \
/go/src/$REPO
WORKDIR /go/bin/
</code></pre>
<p>and the docker-compose definition:</p>
<pre><code class="yaml">version: &quot;3&quot;
services:
watchtower:
image: index.docker.io/containrrr/watchtower:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- &lt;PATH_TO_HOME_DIR&gt;/.docker/config.json:/config.json
- helper:/go/bin
environment:
- HOME=/
- PATH=$PATH:/go/bin
- AWS_REGION=&lt;AWS_REGION&gt;
- AWS_ACCESS_KEY_ID=&lt;AWS_ACCESS_KEY&gt;
- AWS_SECRET_ACCESS_KEY=&lt;AWS_SECRET_ACCESS_KEY&gt;
volumes:
helper: {}
</code></pre>
<p>and for <code>.docker/config.yml</code>:</p>
<pre><code class="yaml"> {
&quot;HttpHeaders&quot; : {
&quot;User-Agent&quot; : &quot;Docker-Client/19.03.1 (XXXXXX)&quot;
},
&quot;credsStore&quot; : &quot;osxkeychain&quot;, // ...or your prefered helper
&quot;auths&quot; : {
&quot;xyzxyzxyz.dkr.ecr.eu-north-1.amazonaws.com&quot; : {},
&quot;https://index.docker.io/v1/&quot;: {}
},
&quot;credHelpers&quot;: {
&quot;xyzxyzxyz.dkr.ecr.eu-north-1.amazonaws.com&quot; : &quot;ecr-login&quot;,
&quot;index.docker.io&quot;: &quot;osxkeychain&quot; // ...or your prefered helper
}
}
</code></pre>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="../container-selection/" title="Container selection" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Previous
</span>
Container selection
</span>
</div>
</a>
<a href="../linked-containers/" title="Linked containers" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
Linked containers
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
</nav>
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
powered by
<a href="https://www.mkdocs.org">MkDocs</a>
and
<a href="https://squidfunk.github.io/mkdocs-material/">
Material for MkDocs</a>
</div>
</div>
</div>
</footer>
</div>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>
</body>
</html>

@ -34,7 +34,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -42,7 +42,7 @@
<link rel="stylesheet" href="assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="assets/stylesheets/application.30686662.css">
@ -171,7 +171,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -239,7 +239,7 @@
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#quick_start" title="Quick Start" class="md-nav__link">
<a href="#quick_start" class="md-nav__link">
Quick Start
</a>
@ -321,6 +321,18 @@
<li class="md-nav__item">
<a href="credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
@ -383,7 +395,7 @@
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#quick_start" title="Quick Start" class="md-nav__link">
<a href="#quick_start" class="md-nav__link">
Quick Start
</a>
@ -509,7 +521,7 @@
</div>
<script src="assets/javascripts/application.245445c6.js"></script>
<script src="assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"."}})</script>

@ -34,7 +34,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -42,7 +42,7 @@
<link rel="stylesheet" href="../assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
@ -167,7 +167,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -290,6 +290,18 @@
<li class="md-nav__item">
<a href="../credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
@ -429,7 +441,7 @@ CONTAINER ID IMAGE STATUS PORTS
</div>
<script src="../assets/javascripts/application.245445c6.js"></script>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>

@ -0,0 +1,484 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="canonical" href="http://containrrr.github.io/watchtower/lifecycle-hooks/">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="en">
<meta name="lang:search.pipeline.stopwords" content="True">
<meta name="lang:search.pipeline.trimmer" content="True">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
<title>Lifecycle hooks - Watchtower</title>
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
<script src="../assets/javascripts/modernizr.74668098.js"></script>
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono&display=fallback">
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
<link rel="stylesheet" href="../assets/fonts/material-icons.css">
</head>
<body dir="ltr">
<svg class="md-svg">
<defs>
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="__github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#executing_commands_before_and_after_updating" tabindex="1" class="md-skip">
Skip to content
</a>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-header-nav__button md-logo">
<i class="md-icon"></i>
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">
Watchtower
</span>
<span class="md-header-nav__topic">
Lifecycle hooks
</span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/containrrr/watchtower/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="http://containrrr.github.io/watchtower/" title="Watchtower" class="md-nav__button md-logo">
<i class="md-icon"></i>
</a>
Watchtower
</label>
<div class="md-nav__source">
<a href="https://github.com/containrrr/watchtower/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href=".." title="Home" class="md-nav__link">
Home
</a>
</li>
<li class="md-nav__item">
<a href="../introduction/" title="Introduction" class="md-nav__link">
Introduction
</a>
</li>
<li class="md-nav__item">
<a href="../usage-overview/" title="Usage overview" class="md-nav__link">
Usage overview
</a>
</li>
<li class="md-nav__item">
<a href="../arguments/" title="Arguments" class="md-nav__link">
Arguments
</a>
</li>
<li class="md-nav__item">
<a href="../notifications/" title="Notifications" class="md-nav__link">
Notifications
</a>
</li>
<li class="md-nav__item">
<a href="../container-selection/" title="Container selection" class="md-nav__link">
Container selection
</a>
</li>
<li class="md-nav__item">
<a href="../credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
</a>
</li>
<li class="md-nav__item">
<a href="../remote-hosts/" title="Remote hosts" class="md-nav__link">
Remote hosts
</a>
</li>
<li class="md-nav__item">
<a href="../secure-connections/" title="Secure connections" class="md-nav__link">
Secure connections
</a>
</li>
<li class="md-nav__item">
<a href="../stop-signals/" title="Stop signals" class="md-nav__link">
Stop signals
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#executing_commands_before_and_after_updating" class="md-nav__link">
Executing commands before and after updating
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#specifying_update_commands" class="md-nav__link">
Specifying update commands
</a>
</li>
<li class="md-nav__item">
<a href="#execution_failure" class="md-nav__link">
Execution failure
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<a href="https://github.com/containrrr/watchtower/edit/master/docs/lifecycle-hooks.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a>
<h1>Lifecycle hooks</h1>
<h2 id="executing_commands_before_and_after_updating">Executing commands before and after updating<a class="headerlink" href="#executing_commands_before_and_after_updating" title="Permanent link">&para;</a></h2>
<blockquote>
<p><strong>DO NOTE</strong>: Both commands are shell commands executed with <code>sh</code>, and therefore require the
container to provide the <code>sh</code> executable.</p>
</blockquote>
<p>It is possible to execute a <em>pre-update</em> command and a <em>post-update</em> command
<strong>inside</strong> every container updated by watchtower. The <em>pre-update</em> command is
executed before stopping the container, and the <em>post-update</em> command is
executed after restarting the container.</p>
<p>This feature is disabled by default. To enable it, you need to set the option
<code>--enable-lifecycle-hooks</code> on the command line, or set the environment variable
<code>WATCHTOWER_LIFECYCLE_HOOKS</code> to <code>true</code>.</p>
<h3 id="specifying_update_commands">Specifying update commands<a class="headerlink" href="#specifying_update_commands" title="Permanent link">&para;</a></h3>
<p>The commands are specified using docker container labels, with
<code>com.centurylinklabs.watchtower.lifecycle.pre-update-command</code> for the <em>pre-update</em>
command and <code>com.centurylinklabs.watchtower.lifecycle.post-update</code> for the
<em>post-update</em> command.</p>
<p>These labels can be declared as instructions in a Dockerfile:</p>
<pre><code class="docker">LABEL com.centurylinklabs.watchtower.lifecycle.pre-update=&quot;/dump-data.sh&quot;
LABEL com.centurylinklabs.watchtower.lifecycle.post-update=&quot;/restore-data.sh&quot;
</code></pre>
<p>Or be specified as part of the <code>docker run</code> command line:</p>
<pre><code class="bash">docker run -d \
--label=com.centurylinklabs.watchtower.lifecycle.pre-update=&quot;/dump-data.sh&quot; \
--label=com.centurylinklabs.watchtower.lifecycle.post-update=&quot;/restore-data.sh&quot; \
someimage
</code></pre>
<h3 id="execution_failure">Execution failure<a class="headerlink" href="#execution_failure" title="Permanent link">&para;</a></h3>
<p>The failure of a command to execute, identified by an exit code different than
0, will not prevent watchtower from updating the container. Only an error
log statement containing the exit code will be reported.</p>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
powered by
<a href="https://www.mkdocs.org">MkDocs</a>
and
<a href="https://squidfunk.github.io/mkdocs-material/">
Material for MkDocs</a>
</div>
</div>
</div>
</footer>
</div>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>
</body>
</html>

@ -34,7 +34,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -42,7 +42,7 @@
<link rel="stylesheet" href="../assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
@ -167,7 +167,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -282,6 +282,18 @@
<li class="md-nav__item">
<a href="../credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
@ -350,7 +362,7 @@
<h1>Linked containers</h1>
<p>Watchtower will detect if there are links between any of the running containers and ensure that things are stopped/started in a way that won't break any of the links. If an update is detected for one of the dependencies in a group of linked containers, watchtower will stop and start all of the containers in the correct order so that the application comes back up correctly.</p>
<p>Watchtower will detect if there are links between any of the running containers and ensures that things are stopped/started in a way that won't break any of the links. If an update is detected for one of the dependencies in a group of linked containers, watchtower will stop and start all of the containers in the correct order so that the application comes back up correctly.</p>
<p>For example, imagine you were running a <em>mysql</em> container and a <em>wordpress</em> container which had been linked to the <em>mysql</em> container. If watchtower were to detect that the <em>mysql</em> container required an update, it would first shut down the linked <em>wordpress</em> container followed by the <em>mysql</em> container. When restarting the containers it would handle <em>mysql</em> first and then <em>wordpress</em> to ensure that the link continued to work.</p>
@ -372,7 +384,7 @@
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="../container-selection/" title="Container selection" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<a href="../credential-helpers/" title="Credential helpers" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
@ -381,7 +393,7 @@
<span class="md-footer-nav__direction">
Previous
</span>
Container selection
Credential helpers
</span>
</div>
</a>
@ -421,7 +433,7 @@
</div>
<script src="../assets/javascripts/application.245445c6.js"></script>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>

@ -34,7 +34,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -42,7 +42,7 @@
<link rel="stylesheet" href="../assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
@ -171,7 +171,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -291,14 +291,14 @@
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#settings" title="Settings" class="md-nav__link">
<a href="#settings" class="md-nav__link">
Settings
</a>
</li>
<li class="md-nav__item">
<a href="#available_services" title="Available services" class="md-nav__link">
<a href="#available_services" class="md-nav__link">
Available services
</a>
@ -306,24 +306,31 @@
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#email" title="Email" class="md-nav__link">
<a href="#email" class="md-nav__link">
Email
</a>
</li>
<li class="md-nav__item">
<a href="#slack" title="Slack" class="md-nav__link">
<a href="#slack" class="md-nav__link">
Slack
</a>
</li>
<li class="md-nav__item">
<a href="#microsoft_teams" title="Microsoft Teams" class="md-nav__link">
<a href="#microsoft_teams" class="md-nav__link">
Microsoft Teams
</a>
</li>
<li class="md-nav__item">
<a href="#gotify" class="md-nav__link">
Gotify
</a>
</li>
</ul>
@ -359,6 +366,18 @@
<li class="md-nav__item">
<a href="../credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
@ -423,14 +442,14 @@
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#settings" title="Settings" class="md-nav__link">
<a href="#settings" class="md-nav__link">
Settings
</a>
</li>
<li class="md-nav__item">
<a href="#available_services" title="Available services" class="md-nav__link">
<a href="#available_services" class="md-nav__link">
Available services
</a>
@ -438,24 +457,31 @@
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#email" title="Email" class="md-nav__link">
<a href="#email" class="md-nav__link">
Email
</a>
</li>
<li class="md-nav__item">
<a href="#slack" title="Slack" class="md-nav__link">
<a href="#slack" class="md-nav__link">
Slack
</a>
</li>
<li class="md-nav__item">
<a href="#microsoft_teams" title="Microsoft Teams" class="md-nav__link">
<a href="#microsoft_teams" class="md-nav__link">
Microsoft Teams
</a>
</li>
<li class="md-nav__item">
<a href="#gotify" class="md-nav__link">
Gotify
</a>
</li>
</ul>
@ -489,6 +515,7 @@ The types of notifications to send are passed via the comma-separated option <co
<li><code>email</code> to send notifications via e-mail</li>
<li><code>slack</code> to send notifications through a Slack webhook</li>
<li><code>msteams</code> to send notifications via MSTeams webhook</li>
<li><code>gotify</code> to send notifications via Gotify</li>
</ul>
<h2 id="settings">Settings<a class="headerlink" href="#settings" title="Permanent link">&para;</a></h2>
<ul>
@ -505,6 +532,7 @@ The types of notifications to send are passed via the comma-separated option <co
<li><code>--notification-email-server-port</code> (env. <code>WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT</code>): The port used to connect to the SMTP server to send e-mails through. Defaults to <code>25</code>.</li>
<li><code>--notification-email-server-user</code> (env. <code>WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER</code>): The username to authenticate with the SMTP server with.</li>
<li><code>--notification-email-server-password</code> (env. <code>WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD</code>): The password to authenticate with the SMTP server with.</li>
<li><code>--notification-email-delay</code> (env. <code>WATCHTOWER_NOTIFICATION_EMAIL_DELAY</code>): Delay before sending notifications expressed in seconds.</li>
</ul>
<p>Example:</p>
<pre><code class="bash">docker run -d \
@ -516,13 +544,14 @@ The types of notifications to send are passed via the comma-separated option <co
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER=smtp.gmail.com \
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=fromaddress@gmail.com \
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=app_password \
-e WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2 \
containrrr/watchtower
</code></pre>
<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>To receive notifications in Slack, add <code>slack</code> to the <code>--notifications</code> option or the <code>WATCHTOWER_NOTIFICATIONS</code> environment variable.</p>
<p>Additionally, you should set the Slack webhook url using the <code>--notification-slack-hook-url</code> option or the <code>WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL</code> environment variable.</p>
<p>Additionally, you should set the Slack webhook URL using the <code>--notification-slack-hook-url</code> option or the <code>WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL</code> environment variable.</p>
<p>By default, watchtower will send messages under the name <code>watchtower</code>, you can customize this string through the <code>--notification-slack-identifier</code> option or the <code>WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER</code> environment variable.</p>
<p>Other, optional, variables include:</p>
<ul>
@ -545,7 +574,7 @@ The types of notifications to send are passed via the comma-separated option <co
<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>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.</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.</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>
<pre><code class="bash">docker run -d \
@ -556,6 +585,17 @@ The types of notifications to send are passed via the comma-separated option <co
-e WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA=true \
containrrr/watchtower
</code></pre>
<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>
<pre><code class="bash">docker run -d \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
-e WATCHTOWER_NOTIFICATIONS=gotify \
-e WATCHTOWER_NOTIFICATION_GOTIFY_URL=&quot;https://my.gotify.tld/&quot; \
-e WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN=&quot;SuperSecretToken&quot; \
containrrr/watchtower
</code></pre>
@ -625,7 +665,7 @@ The types of notifications to send are passed via the comma-separated option <co
</div>
<script src="../assets/javascripts/application.245445c6.js"></script>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>

@ -34,7 +34,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -42,7 +42,7 @@
<link rel="stylesheet" href="../assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
@ -167,7 +167,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -283,6 +283,18 @@
<li class="md-nav__item">
<a href="../credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
@ -433,7 +445,7 @@
</div>
<script src="../assets/javascripts/application.245445c6.js"></script>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>

File diff suppressed because one or more lines are too long

@ -34,7 +34,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -42,7 +42,7 @@
<link rel="stylesheet" href="../assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
@ -167,7 +167,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -283,6 +283,18 @@
<li class="md-nav__item">
<a href="../credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
@ -429,7 +441,7 @@
</div>
<script src="../assets/javascripts/application.245445c6.js"></script>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>

@ -2,52 +2,57 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://containrrr.github.io/watchtower/</loc>
<lastmod>2019-07-02</lastmod>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://containrrr.github.io/watchtower/introduction/</loc>
<lastmod>2019-07-02</lastmod>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://containrrr.github.io/watchtower/usage-overview/</loc>
<lastmod>2019-07-02</lastmod>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://containrrr.github.io/watchtower/arguments/</loc>
<lastmod>2019-07-02</lastmod>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://containrrr.github.io/watchtower/notifications/</loc>
<lastmod>2019-07-02</lastmod>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://containrrr.github.io/watchtower/container-selection/</loc>
<lastmod>2019-07-02</lastmod>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://containrrr.github.io/watchtower/credential-helpers/</loc>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://containrrr.github.io/watchtower/linked-containers/</loc>
<lastmod>2019-07-02</lastmod>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://containrrr.github.io/watchtower/remote-hosts/</loc>
<lastmod>2019-07-02</lastmod>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://containrrr.github.io/watchtower/secure-connections/</loc>
<lastmod>2019-07-02</lastmod>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://containrrr.github.io/watchtower/stop-signals/</loc>
<lastmod>2019-07-02</lastmod>
<lastmod>2019-09-15</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

@ -34,7 +34,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -42,7 +42,7 @@
<link rel="stylesheet" href="../assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
@ -167,7 +167,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -283,6 +283,18 @@
<li class="md-nav__item">
<a href="../credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
@ -414,7 +426,7 @@ If your container should be shutdown with a different signal you can communicate
</div>
<script src="../assets/javascripts/application.245445c6.js"></script>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>

@ -34,7 +34,7 @@
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.0">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
@ -42,7 +42,7 @@
<link rel="stylesheet" href="../assets/stylesheets/application.0284f74d.css">
<link rel="stylesheet" href="../assets/stylesheets/application.30686662.css">
@ -167,7 +167,7 @@
<main class="md-main">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
@ -290,6 +290,18 @@
<li class="md-nav__item">
<a href="../credential-helpers/" title="Credential helpers" class="md-nav__link">
Credential helpers
</a>
</li>
<li class="md-nav__item">
<a href="../linked-containers/" title="Linked containers" class="md-nav__link">
Linked containers
@ -351,7 +363,7 @@
<h1>Usage overview</h1>
<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 -v 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>
<pre><code class="bash">docker run -d \
--name watchtower \
@ -379,7 +391,7 @@ or by mounting the host's docker config file into the container (at the root of
containrrr/watchtower container_to_watch --debug
</code></pre>
<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 dockerhub 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;
services:
cavo:
@ -463,7 +475,7 @@ services:
</div>
<script src="../assets/javascripts/application.245445c6.js"></script>
<script src="../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>

Loading…
Cancel
Save