<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>
<pre><codeclass="bash">docker run -d \
--name watchtower \
-e DOCKER_HOST=$DOCKER_HOST \
-e DOCKER_CERT_PATH=/etc/ssl/docker \
-v $DOCKER_CERT_PATH:/etc/ssl/docker \
containrrr/watchtower --tlsverify
</code></pre></article></div></div></main><footerclass="md-footer"><divclass="md-footer-nav"><navclass="md-footer-nav__inner md-grid"><ahref="../remote-hosts/"title="Remote hosts"class="md-flex md-footer-nav__link md-footer-nav__link--prev"rel="prev"><divclass="md-flex__cell md-flex__cell--shrink"><iclass="md-icon md-icon--arrow-back md-footer-nav__button"></i></div><divclass="md-flex__cell md-flex__cell--stretch md-footer-nav__title"><spanclass="md-flex__ellipsis"><spanclass="md-footer-nav__direction">Previous</span>Remote hosts</span></div></a><ahref="../stop-signals/"title="Stop signals"class="md-flex md-footer-nav__link md-footer-nav__link--next"rel="next"><divclass="md-flex__cell md-flex__cell--stretch md-footer-nav__title"><spanclass="md-flex__ellipsis"><spanclass="md-footer-nav__direction">Next</span>Stop signals</span></div><divclass="md-flex__cell md-flex__cell--shrink"><iclass="md-icon md-icon--arrow-forward md-footer-nav__button"></i></div></a></nav></div><divclass="md-footer-meta md-typeset"><divclass="md-footer-meta__inner md-grid"><divclass="md-footer-copyright">powered by <ahref="https://www.mkdocs.org">MkDocs</a> and <ahref="https://squidfunk.github.io/mkdocs-material/">Material for MkDocs</a></div></div></div></footer></div><scriptsrc="../assets/javascripts/application.b260a35d.js"></script><script>app.initialize({version:"1.0.4",url:{base:".."}})</script></body></html>