Skip to content

Add/remove docker containers automatically in /etc/hosts

Notifications You must be signed in to change notification settings

warbaque/docker-update-hosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-update-hosts

This tool is meant for simple systems without local dns resolver.

Updates /etc/hosts automatically when container networks are changed.

Example block

# BEGIN DOCKER CONTAINERS
172.17.0.2 container1
172.17.0.3 container2
172.27.0.2 service2
172.27.0.3 service2_db
172.18.0.2 service3
# END DOCKER CONTAINERS

usage

run script as stand-alone updater

./docker-update-hosts

setup script as systemd service

./setup

About

Add/remove docker containers automatically in /etc/hosts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages