0

In our solution we want to connect our Edge module to the servicebus of a host on a different network.

The dns server is not allowed (per design) to have the dns mapping to that host, hence I need to do the dns mapping in the hosts file of the Windows container that the Edge module is running in.

I have done some tests with the docker run and docker build commands, setting the --add-host parameter, but this doesn't seem to be supported in Windows containers. Looking at the file after the container has been started with that flag at least suggests that it is not.

Moreover I'm not sure I can use this since the Edge runtime is in control of the running of containers (please correct me if I'm wrong here).

In my desperation I tried to modify the hosts file through code, but got stopped due to administrative previledges not beeing met. Anyways this feels like a hack and is not what one should have to do.

Is there an easier way to add a dns host mapping?

4

1 回答 1

0

假设您使用的是 Windows 基础映像 - 您可以在那里修改 hosts 文件。

于 2019-01-25T18:56:57.330 回答