Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 932 Bytes

README.md

File metadata and controls

30 lines (26 loc) · 932 Bytes

Build Status

container_restarter

Watches specific domain name and restarts a container when resolved IP changes

Usage:

Usage of ./container_restarter:
  -c string
        Name of container to restart
  -id string
        ID of the container to restart
  -d string
        Domain name to watch IP change
  -h string
        docker server host (default "unix:///var/run/docker.sock")
  -i duration
        Time interval to check IP change on domain (default 10s)
  -v string
        Docker API version (default "1.40")

Docker example. Watch resolving result changes on domain and restart container when change detected:

docker run -d \
       -v /var/run/docker.sock:/var/run/docker.sock \
       ruijzhan/container_restarter:arm64 \
       -c container_name -d shadowsocks.server.com