I use Docker Desktop for Windows. I noticed it adds to my OS's host file <ip> host.docker.internal, where <ip> is the private machine IP for the connected local network. (This DNS name is used to communicate from containers to the host machine.) What are the implications of this? Does this mean that a machine connected to the same network can access Docker on my machine? Is Docker safe to use on a unsecured network?
Asked
Active
Viewed 321 times
1
Code
- 403
- 1
- 5
- 6
1 Answers
2
Does this mean that a machine connected to the same network can access Docker on my machine?
Just like regular Docker, containers aren't directly exposed to the network unless you manually expose specific ports on them. host.docker.internal is a special value used to ensure the host is reachable from containers, even if its address changes.
Is Docker safe to use on a unsecured network?
In general, probably, but you'd need to be careful if you are exposing ports to the unsecured network, or if your containers are connecting to outside services using non-secure protocols.
See the docs for more details.
multithr3at3d
- 12,842
- 3
- 32
- 43