I have verified the documentation and the installation of docker in my windows 11 operating system and I have noticed that my host file has undergone modifications, specifically this was added at the end:
# Added by Docker Desktop
192.168.1.210 host.docker.internal
192.168.1.210 gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section
Is it possible to profit somehow? so that something in docker resolves (like a DNS) the custom urls like:
It is not just Windows. Hosts files are just simple ip-domain mappings without wildcards on every operating system.
Docker has internal support for the added domains. I guess it writes it into the hosts file on the host machine so you can use it not just in containers but from the host. You can use these domains in a reverse proxy container, but I don’t see how that would help. If you want dynamic domain resolution, you can configure a DNS server in your local environment. On a router for example. I did it in my old TP-Link router on which I have OpenWRT, not the original tplink software. Or you can use a public and free DNS like https://nip.io/. You would still need to include the ip address in the domain name, but you could use it as a hostname and you could use subdomains as well like: