litl / galaxy

Docker Micro-PaaS
MIT License
119 stars 19 forks source link

Add services needed by apps to /etc/hosts #240

Closed jbardin closed 9 years ago

jbardin commented 9 years ago

The docker --add-host option put entries into the /etc/hosts inside the container. Use this instead of the dnsmasq resolver with the *.galaxy zone.

joeshaw commented 9 years ago

Can this be done dynamically after the container has started? Otherwise it could be an issue if two services are interdependent.

jbardin commented 9 years ago

*.galaxy always resolves to the external IP of the local host (it gets redirected through shuttle), so IPs shouldn't need to change.

I think one could technically exec into the running container and modify /etc/hosts if needed, but apps should generally know what other services they will depend on for the lifetime of that particular version.

jbardin commented 9 years ago

no clean way to do this currently, but we can bundle it with replacing the storage backend