I have a website in IIS of my host machine which is accessible by http://mysite.local address. I also have a windows container running on this host and I'm trying to connect to that website, from my windows container by using "curl http://mysite.local".
I'm going to add the proper DNS entry to hosts file of the container. To do so, I connect to command shell of the container and run the following command:
echo 192.168.0.144 mysite.local >> c:\windows\system32\drivers\etc
But the console shows "Access is denied."
So basically, my question is:
- How can I add DNS entries to hosts file of a Windows Container?
I'm using Docker Desktop version 2.3.0.4(46911)
, having Engine version 19.03.12
on Windows 10
.
I've created the container using mcr.microsoft.com/windows/servercore:ltsc2019
as windows base image, also tried nanoserver:1903
.