4

I'm just trying to run chromedriver in an Alpine docker container, but I keep getting this error:

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

The Dockerfile is simply

FROM alpine:3.9

RUN apk --no-cache --update add chromium chromium-chromedriver

EXPOSE 9515

CMD chromedriver --verbose

I'm trying to use it alongside other containers, so here is the relevant portion of the docker-compose.yml if it is helpful:

version: "3.6"

services:
  chromedriver:
    container_name: chromedriver
    build:
      context: "."
      dockerfile: "docker/test/Dockerfile.chromedriver"
    ports:
      - 9515:9515

After the error is logged, chromedriver doesn't exit and stays open, but my other containers can't seem to find the service, so I'm assuming it's not actually running and accepting connections.

Any ideas how to fix this are appreciated!

Svilen
  • 2,608
  • 24
  • 26
  • See [my answer](https://stackoverflow.com/a/57328161/1377864) in another question. Docker doesn't enable IPv6 by default and this error message indicates that binding to IPv6 address failed. It still listens on IPv4 address, so error message can be safely ignored. – Yaroslav Admin Aug 02 '19 at 14:14

0 Answers0