lkpfabric.blogg.se

Docker network host no need to publish
Docker network host no need to publish







docker network host no need to publish

There is also which may work depending on what you're trying to do exactly. We technically provide a DNS name you can use for this purpose: this is currently used by, as you can guess, kubernetes, allowing us to share the kube context on the host and inside containers.

docker network host no need to publish

However, if you're looking for a solution that is 'developer only' (this won't necessarily work in production) and you are trying to standardise a mechanism for talking to containers either from a different container or on the host, you need to use a DNS name (not an IP address) as the DNS name will resolve to different IP addresses inside containers and on the host - we no longer have an IP address accessible by both the host and the container. Generally for container to container communication we have DNS names provided by docker compose for example. Implementing something which allows you to access the host from a container AND use the same mechanism for container-to-container communication is not a best practice, because at scale the system often needs multiple hosts across a cluster, and so the hostname (and IP) will change.









Docker network host no need to publish