Edge selenium in gitlab ci

I have a runner isolated from the Internet, I created a docker container based on Ubuntu, installed Edge and Python 3.11 there. I wrote a script that automates (web scraping) local work sites.
Problem: error when executing the script, but if you launch a locally created Docker container and run the script in it, then everything works.

gitlab ci:
image: local-nexus/repo/msedge-python:v1

  • python3 file.py

I get an error: "selenium.common.exceptions.WebDriverException: Message ‘msedgedriver’ executables needs be in path. (links to webdriver.edge(options=options))

If I add msedgedriver to path, I get an error: AttributeError: ‘Service’ object has no attribute ‘process’ (links to webdriver.edge(service=service, options=options))

how to run a task correctly? (without internet)