Skip to content

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

Notifications You must be signed in to change notification settings

ruijzhan/container_restarter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published