MaxRetryError при запуске контейнера selenium-chrome

Dockerfile:

FROM python:3.8

# install google chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
RUN apt-get -y update
RUN apt-get install -y google-chrome-stable

# install chromedriver

RUN apt-get install -yqq unzip
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/

# upgrade pip
RUN pip install --upgrade pip

ENV CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHORT_SHA}
ENV CI_COMMIT_REF_SLUG=${CI_COMMIT_REF_SLUG}

COPY . /web_automated_tests
WORKDIR /web_automated_tests

RUN python -m pip install --upgrade pip setuptools
RUN python -m pip install -r requirements.txt
        
ENV LANG C.UTF-8
ENV PYTHONUNBUFFERED 1
ENV PYTHONPATH "${PYTHONPATH}:$(pwd)"

EXPOSE 4444

CMD ["pytest", "tests/test_sign_up.py"]

Драйвер:

remote_url = "http://127.0.0.1:4444/wd/hub" (пробовал localhost и другие порты)
driver = webdriver.Remote(remote_url, options=options)

Запускаю контейнер командой docker run -p 4444:4444 container_name, получаю ошибку:

      raise MaxRetryError(_pool, url, error or ResponseError(cause))

E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘127.0.0.1’, port=4444): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f50573c1160>: Failed to establish a new connection: [Errno 111] Connection refused’))

/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py:574: MaxRetryError
------------------------------ Captured log setup ------------------------------
WARNING urllib3.connectionpool:connectionpool.py:780 Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f5057178c10>: Failed to establish a new connection: [Errno 111] Connection refused’)’: /wd/hub/session
WARNING urllib3.connectionpool:connectionpool.py:780 Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f5057178ee0>: Failed to establish a new connection: [Errno 111] Connection refused’)’: /wd/hub/session
WARNING urllib3.connectionpool:connectionpool.py:780 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f5057178070>: Failed to establish a new connection: [Errno 111] Connection refused’)’: /wd/hub/session
=========================== short test summary info ============================
ERROR tests/test_sign_up.py::test_user_can_signup - urllib3.exceptions.MaxRet…
=============================== 1 error in 0.32s ===============================

Есть идеи как починить?

Ругается на ваш скрипт же

Google search