Hostinator is a tool for automatically adding Docker containers to the hosts file.
262
Hostinator is a tool for automatically adding Docker containers to the hosts file.
Docker Compose has a really useful feature that enables you to access a container by alias from within containers on the same network. The primary aim of this project is to make those same resolutions work from the Docker host.
HOSTINATOR_NETWORK environment variable.This project is availiable as a Docker image at chrisgavin/hostinator. You can use it like so:
docker run -it --rm \
-v "/var/run/docker.sock:/var/run/docker.sock" \
-v "/etc/:/mnt/etc/" \
chrisgavin/hostinator
You can also integrate this with an existing Docker Compose configuration. You can add it as a service in your Docker Compose file.
hostinator:
image: "chrisgavin/hostinator"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/etc/:/mnt/etc/"
environment:
- "HOSTINATOR_NETWORK=myproject_default"
Content type
Image
Digest
Size
22.7 MB
Last updated
over 9 years ago
docker pull chrisgavin/hostinator