DEV Community

Discussion on: Access host from a docker container

Collapse
 
lon9man profile image
lon9man

how about the opposite?

  1. i have HOST with multiple dockers (1 docker - 1 apache)
  2. i have 1 proxy-apache on HOST with will route request to applicable docker

i want to use in proxy-apache some DNS-names per each docker instead of IPs, which can be dynamic.

so after docker started it should insert own IP into HOST's /etc/hosts.

how to implement this? (very low info in google about such case)