Deployed 247baf5 with MkDocs version: 1.1.2

gh-pages
5 years ago
parent e7c07c8ba8
commit 670ba26f36

@ -483,7 +483,7 @@
<p style="text-align: center; margin-left: 1.6rem;"> <p style="text-align: center; margin-left: 1.6rem;">
<img src="./images/logo-450px.png" width="450" /> <img alt="Logotype depicting a lighthouse" src="./images/logo-450px.png" width="450" />
</p> </p>
<h1 align="center"> <h1 align="center">
Watchtower Watchtower
@ -529,19 +529,22 @@
Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing container 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 and restart it with the same options that were used when it was deployed initially. Run the watchtower container with
the following command:</p> the following command:</p>
<div class="tabbed-set" data-tabs="1:1"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><label for="__tabbed_1_1">docker run</label><div class="tabbed-content"></div> <div class="tabbed-set" data-tabs="1:2"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><label for="__tabbed_1_1">docker run</label><div class="tabbed-content">
</div> <div class="highlight"><pre><span></span><code>$ docker run -d <span class="se">\</span>
<p>```bash $ docker run -d \ --name watchtower <span class="se">\</span>
--name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock <span class="se">\</span>
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower containrrr/watchtower
<div class="highlight"><pre><span></span><code>=== &quot;docker-compose.yml&quot; </code></pre></div>
```yaml version: &quot;3&quot; </div>
services: <input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><label for="__tabbed_1_2">docker-compose.yml</label><div class="tabbed-content">
watchtower: <div class="highlight"><pre><span></span><code><span class="nt">version</span><span class="p">:</span> <span class="s">&quot;3&quot;</span>
image: containrrr/watchtower volumes: <span class="nt">services</span><span class="p">:</span>
- /var/run/docker.sock:/var/run/docker.sock <span class="nt">watchtower</span><span class="p">:</span>
</code></pre></div></p> <span class="nt">image</span><span class="p">:</span> <span class="nt">containrrr/watchtower volumes</span><span class="p">:</span>
<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></div>
</div>
</div>

@ -611,19 +611,22 @@ executable.</p>
</table> </table>
<p>These labels can be declared as instructions in a Dockerfile (with some example .sh files) or be specified as part of <p>These labels can be declared as instructions in a Dockerfile (with some example .sh files) or be specified as part of
the <code>docker run</code> command line:</p> the <code>docker run</code> command line:</p>
<div class="tabbed-set" data-tabs="1:1"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><label for="__tabbed_1_1">Dockerfile</label><div class="tabbed-content"></div> <div class="tabbed-set" data-tabs="1:2"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><label for="__tabbed_1_1">Dockerfile</label><div class="tabbed-content">
</div> <div class="highlight"><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>
<p>```docker LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh" <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.pre-update="/dump-data.sh" <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-update="/restore-data.sh" <span class="k">LABEL</span> com.centurylinklabs.watchtower.lifecycle.post-check<span class="o">=</span><span class="s2">&quot;/send-heartbeat.sh&quot;</span>
LABEL com.centurylinklabs.watchtower.lifecycle.post-check="/send-heartbeat.sh" </code></pre></div>
<div class="highlight"><pre><span></span><code>=== &quot;docker run&quot; </div>
```bash docker run -d \ <input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><label for="__tabbed_1_2">docker run</label><div class="tabbed-content">
--label=com.centurylinklabs.watchtower.lifecycle.pre-check=&quot;/sync.sh&quot; \ <div class="highlight"><pre><span></span><code>docker run -d <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-check<span class="o">=</span><span class="s2">&quot;/sync.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.pre-update<span class="o">=</span><span class="s2">&quot;/dump-data.sh&quot;</span> <span class="se">\</span>
someimage --label=com.centurylinklabs.watchtower.lifecycle.post-check=&quot;/send-heartbeat.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>
</code></pre></div></p> someimage --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></div>
</div>
</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
occur, forcing Watchtower to continue the update loop.</p> occur, forcing Watchtower to continue the update loop.</p>

@ -641,8 +641,8 @@ helper in a separate container and mount it using volumes.</p>
<p>Use the dockerfile below to build the <a href="https://github.com/awslabs/amazon-ecr-credential-helper">amazon-ecr-credential-helper</a>, <p>Use the dockerfile below to build the <a href="https://github.com/awslabs/amazon-ecr-credential-helper">amazon-ecr-credential-helper</a>,
in a volume that may be mounted onto your watchtower container.</p> in a volume that may be mounted onto your watchtower container.</p>
<ol> <ol>
<li>Create the Dockerfile (contents below):</li> <li>
</ol> <p>Create the Dockerfile (contents below):
<div class="highlight"><pre><span></span><code><span class="k">FROM</span> <span class="s">golang:latest</span> <div class="highlight"><pre><span></span><code><span class="k">FROM</span> <span class="s">golang:latest</span>
<span class="k">ENV</span> CGO_ENABLED <span class="m">0</span> <span class="k">ENV</span> CGO_ENABLED <span class="m">0</span>
@ -657,10 +657,10 @@ in a volume that may be mounted onto your watchtower container.</p>
/go/src/<span class="nv">$REPO</span> /go/src/<span class="nv">$REPO</span>
<span class="k">WORKDIR</span><span class="s"> /go/bin/</span> <span class="k">WORKDIR</span><span class="s"> /go/bin/</span>
</code></pre></div> </code></pre></div></p>
<ol> </li>
<li>Use the following commands to build the aws-ecr-dock-cred-helper and store it's output in a volume:</li> <li>
</ol> <p>Use the following commands to build the aws-ecr-dock-cred-helper and store it's output in a volume:
<div class="highlight"><pre><span></span><code><span class="c1"># Create a volume to store the command (once built)</span> <div class="highlight"><pre><span></span><code><span class="c1"># Create a volume to store the command (once built)</span>
docker volume create helper docker volume create helper
@ -668,12 +668,13 @@ docker volume create helper
docker build -t aws-ecr-dock-cred-helper . docker build -t aws-ecr-dock-cred-helper .
<span class="c1"># Build the command and store it in the new volume in the /go/bin directory.</span> <span class="c1"># Build the command and store it in the new volume in the /go/bin directory.</span>
docker run -d --rm --name aws-cred-helper --volume helper:/go/bin aws-ecr-dock-cred-helper docker run -d --rm --name aws-cred-helper <span class="se">\</span>
</code></pre></div> --volume helper:/go/bin aws-ecr-dock-cred-helper
<ol> </code></pre></div></p>
<li>Create a configuration file for docker, and store it in $HOME/.docker/config.json (replace the <AWS_ACCOUNT_ID> </li>
placeholders with your AWS Account ID):</li> <li>
</ol> <p>Create a configuration file for docker, and store it in $HOME/.docker/config.json (replace the <AWS_ACCOUNT_ID>
placeholders with your AWS Account ID):
<div class="highlight"><pre><span></span><code><span class="p">{</span> <div class="highlight"><pre><span></span><code><span class="p">{</span>
<span class="nt">&quot;credsStore&quot;</span> <span class="p">:</span> <span class="s2">&quot;ecr-login&quot;</span><span class="p">,</span> <span class="nt">&quot;credsStore&quot;</span> <span class="p">:</span> <span class="s2">&quot;ecr-login&quot;</span><span class="p">,</span>
<span class="nt">&quot;HttpHeaders&quot;</span> <span class="p">:</span> <span class="p">{</span> <span class="nt">&quot;HttpHeaders&quot;</span> <span class="p">:</span> <span class="p">{</span>
@ -686,10 +687,10 @@ docker run -d --rm --name aws-cred-helper --volume helper:/go/bin aws-ecr-dock-
<span class="nt">&quot;&lt;AWS_ACCOUNT_ID&gt;.dkr.ecr.us-west-1.amazonaws.com&quot;</span> <span class="p">:</span> <span class="s2">&quot;ecr-login&quot;</span> <span class="nt">&quot;&lt;AWS_ACCOUNT_ID&gt;.dkr.ecr.us-west-1.amazonaws.com&quot;</span> <span class="p">:</span> <span class="s2">&quot;ecr-login&quot;</span>
<span class="p">}</span> <span class="p">}</span>
<span class="p">}</span> <span class="p">}</span>
</code></pre></div> </code></pre></div></p>
<ol> </li>
<li> <li>
<p>Create a docker-compose file (as an example) to help launch the container:</p> <p>Create a docker-compose file (as an example) to help launch the container:
<div class="highlight"><pre><span></span><code><span class="nt">version</span><span class="p">:</span> <span class="s">&quot;3.4&quot;</span> <div class="highlight"><pre><span></span><code><span class="nt">version</span><span class="p">:</span> <span class="s">&quot;3.4&quot;</span>
<span class="nt">services</span><span class="p">:</span> <span class="nt">services</span><span class="p">:</span>
<span class="c1"># Check for new images and restart things if a new image exists</span> <span class="c1"># Check for new images and restart things if a new image exists</span>
@ -707,7 +708,7 @@ docker run -d --rm --name aws-cred-helper --volume helper:/go/bin aws-ecr-dock-
<span class="nt">volumes</span><span class="p">:</span> <span class="nt">volumes</span><span class="p">:</span>
<span class="nt">helper</span><span class="p">:</span> <span class="nt">helper</span><span class="p">:</span>
<span class="nt">external</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="nt">external</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span>
</code></pre></div> </code></pre></div></p>
</li> </li>
</ol> </ol>
<p>A few additional notes:</p> <p>A few additional notes:</p>

File diff suppressed because one or more lines are too long

Binary file not shown.
Loading…
Cancel
Save