watchtower/docs/remote-hosts.md

21 lines
734 B
Markdown
Raw Normal View History

# Remote Docker Hosts
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 `--host` flag or the `DOCKER_HOST` environment variable:
```bash
docker run -d \
--name watchtower \
2024-07-09 09:22:02 +02:00
beatkind/watchtower --host "tcp://10.0.1.2:2375"
```
or
```bash
docker run -d \
--name watchtower \
-e DOCKER_HOST="tcp://10.0.1.2:2375" \
2024-07-09 09:22:02 +02:00
beatkind/watchtower
```
Note in both of the examples above that it is unnecessary to mount the _/var/run/docker.sock_ into the watchtower container.