docker4drupal icon indicating copy to clipboard operation
docker4drupal copied to clipboard

Domain name change recommended in Docker release notes

Open tanc opened this issue 7 years ago • 3 comments

The latest Docker edge version states in its release notes that localhost should no longer be used.

DNS name docker.for.mac.host.internal shoud be used instead of docker.for.mac.localhost (still valid) for host resolution from containers, since since there is an RFC banning the use of subdomains of localhost (See https://tools.ietf.org/html/draft-west-let-localhost-be-localhost-06).

This would mean changing all the domains to drupal.docker.host.internal and xxxxxx.drupal.docker.host.internal if I've understood correctly. Not sure if localhost based domains will ever stop working so it may not be worth worrying about but just noting the issue here for consideration.

tanc avatar Jan 12 '18 08:01 tanc

On macOS you can use dnsmasq for routing. Since we are using Træfik for routing could it be the shorter xxxxx.internal or xxxxx.docker.internal? this should also work if you edit hosts to xxxxx.internal 127.0.0.1

michaelpporter avatar Jan 24 '18 18:01 michaelpporter

I've haven't found any official Docker docs on using certain domains, even docker.localhost not documented. I don't see any point to use docker.host.internal, you still have to add it to the hosts file, docker.localhost at least works in Chrome. I know it's not a good way because localhost not designed to have any subdomains. If changing to anything then to something like drupal.loc

csandanov avatar Mar 16 '18 16:03 csandanov

Our team at work settled on using *.test. We setup dnsmasq for routing *.test to 127.0.0.1 so there is no hosts file change.

michaelpporter avatar Mar 17 '18 11:03 michaelpporter