No description
- Go 91.7%
- Shell 8.3%
| assets | ||
| .gitignore | ||
| build.sh | ||
| docker.go | ||
| flags.go | ||
| go.mod | ||
| go.sum | ||
| hosts.go | ||
| install.go | ||
| Readme.md | ||
| run.sh | ||
| socket.go | ||
Jona's Docker Hosts-File DNS
The Docker Hosts-File DNS adds all local running Docker-Containers to the /etc/hosts file, listens for changes and updates them if needed. This helps to access all Docker-Containers by their name from your hostmachine.
How can this help?
- the containers can be accessed directly by its name from the hostmachine.
- you can use ssh tunnels. For example:
- you have a computer and want to access a docker container on your raspberry pi in the same network. Where a few docker containers are running and a lot of them have port 80 open. But you do not want to open all ports to the outerworld. So how to access a defined container to only this port? You can use the following on your computer:
ssh -L 80:nginx:80 pi # ssh -L localport:containername:containerport server
How to build?
./build.sh
How to run?
./build.sh && clear && sudo ./docker-hostsfile-dns
How to install on your raspberry pi?
./docker-hosts-file-dns install
How to ask for version?
./docker-hosts-file-dns version