我使用docker-compose.yml
隔离地将容器部署到Service Fabric群集(两个Windows):
version: '3'
services:
webhost:
image: xxxxxcr.azurecr.io/container.image:latest
isolation: hyperv
deploy:
replicas: 2
ports:
- 80/http
environment:
...
但是此容器无法解析DNS。在容器内执行nslookup
时,它显示:
C:\>nslookup xxxxxdatabase.documents.azure.com
Server: UnKnown
Address: 172.31.240.1
*** UnKnown can't find xxxxxdatabase.documents.azure.com: Server failed
部署没有isolation: hyperv
的完全相同的映像不会导致此问题。
我尝试-没有成功-将dns
项作为described in this answer添加到撰写文件中。看来Service Fabric compose可能不支持dns
。
更多详细信息:
WindowsServerSemiAnnual / Datacenter-Core-1803-with-Containers-smalldisk / 1803.0.20190115
microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1803
我需要怎么做才能在此隔离的容器中获得DNS解析?