2
里面我有两个容器,一个运行的Node.js进程启动量角器,和其他正在运行的独立硒容器。该文件是这样的:域名解析主机上,而不是搬运工容器
version: '2'
services:
www.example.localhost:
build: .
depends_on:
- selenium
dns_search:
- static.example.localhost
extra_hosts:
- "static.example.localhost:127.0.0.1"
ports:
- "3000:3000"
- "4000:4000"
volumes:
- ./src:/code/src
- ./api:/code/api
entrypoint: "npm run"
command: "test:e2e"
selenium:
dns_search:
- selenium.example.localhost
image: selenium/standalone-chrome-debug:2.52.0
environment:
no_proxy: localhost
volumes:
- /dev/urandom:/dev/random
ports:
- "4444:4444"
- "6900:5900"
www.example.localhost
运行量角器,这反过来又连接到硒容器与这些线protractor.config.js:
seleniumAddress: "http://selenium:4444/wd/hub",
directConnect: false,
当我硒容器上运行VNC ,打开容器中的Chrome浏览器并键入www.example.localhost:3000
它无法解析域。但是,当我运行wget www.example.localhost:3000
它获得index.html文件就好了。任何想法我做错了什么?