我只是试图在Alpine docker容器中运行chromedriver
,但我不断收到此错误:
Starting ChromeDriver 72.0.3626.121 on port 9515
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1560858426.290][SEVERE]: bind() returned an error, errno=0: Address not available (99)
[1560858426.290][INFO]: listen on IPv6 failed with error ERR_ADDRESS_INVALID
Dockerfile很简单
FROM alpine:3.9
RUN apk --no-cache --update add chromium chromium-chromedriver
EXPOSE 9515
CMD chromedriver --verbose
我正在尝试将其与其他容器一起使用,因此如果有用,这里是docker-compose.yml
的相关部分:
version: "3.6"
services:
chromedriver:
container_name: chromedriver
build:
context: "."
dockerfile: "docker/test/Dockerfile.chromedriver"
ports:
- 9515:9515
记录错误后,chromedriver不会退出并保持打开状态,但是我的其他容器似乎找不到该服务,因此我假设它实际上并未在运行并接受连接。
感谢任何解决此问题的想法!