News for hackers. Stuff that matters.
Re:Show HN: Docker.hostip.dev – Access localhost from Docker... by aaronedam on Sunday April 26, 2020 @10:43AM (#22987475)
While Docker is already offering 'host.docker.internal', what is the reason for this blog post?
Re:Show HN: Docker.hostip.dev – Access localhost from Docker... by aussieguy1234 on Monday April 27, 2020 @11:10PM (#23002916)
host.docker.internal does not work on a Linux host.

For other OSes the hostnames provided by Docker are inconsistent, i.e. docker.for.mac.localhost

This just provides a cross platform hostname that you can use on any OS.

Re:Show HN: Docker.hostip.dev – Access localhost from Docker... by fulafel on Sunday April 26, 2020 @02:06PM (#22988891)
A lot of developers are confused about the loopback address (aka localhost). This product name/description seems to build on it and so seems a little cynical?
Re:Show HN: Docker.hostip.dev – Access localhost from Docker... by aussieguy1234 on Monday April 27, 2020 @11:12PM (#23002937)
Accessing "localhost" in a Docker container will send you to the loopback address of the container itself.

docker.hostip.dev points to the default bridge network adaptor address which will access your dev machines localhost. It does not replace accessing localhost/127.0.0.1 on your dev machine directly

Re:Show HN: Docker.hostip.dev – Access localhost from Docker... by fulafel on Monday April 27, 2020 @11:32PM (#23003045)
"Your dev machines localhost" is confused - this is unrelated to the loopback. Also "the loopback address of the container itself" - there is a loopback interface per network node, be it a container or host, different loopback addresses (127.0.0.2 etc) would not change anything.