Xxuhua912K零S
- 已编辑
现在应用通过devops的部署组件部署到容器中后,启动报错:
java.net.UnknownHostException: disconf.xxx.com
这个域名是容器之外部署的配置中心,且没有做dns解析,也就是需要配置hosts:
192.168.10.1 disconf.xxx.com
问题:
1、请问如何将这条hosts配置到容器中去,让容器能够识别到?
2、如果每个环境的hosts不一样,如果根据环境设置不同的hosts?
现在应用通过devops的部署组件部署到容器中后,启动报错:
java.net.UnknownHostException: disconf.xxx.com
这个域名是容器之外部署的配置中心,且没有做dns解析,也就是需要配置hosts:
192.168.10.1 disconf.xxx.com
问题:
1、请问如何将这条hosts配置到容器中去,让容器能够识别到?
2、如果每个环境的hosts不一样,如果根据环境设置不同的hosts?