ich habe ein Projekt, welches ich mit Docker ausführen möchte. Dafür benötige ich das Image ubuntu. Eine Komponente benötigt Selenium (nicht als reines Testtool). Wie kann ich selenium installieren/ausführen? Wenn ich nur chromium-chromedriver und xvfb installiere, bekomm ich immer den Fehler
Code: Alles auswählen
raise WebDriverException(selenium.common.exceptions.WebDriverException: Message: Service /usr/lib/chromium-browser/chromedriver unexpectedly exited. Status code was: 1
Meine Dockerfile sieht wie folgt aus:
Code: Alles auswählen
FROM ubuntu:latest
RUN apt-get update -y \
&& apt-get install -y python3 \
&& apt-get install -y python3-pip \
&& apt-get install -y libatlas-base-dev \
&& apt-get install -y portaudio19-dev \
&& apt-get install -y sox \
&& apt-get install -y flac \
&& apt-get install -y chromium-chromedriver \
&& apt-get install -y sqlite3 \
&& apt-get install -y vlc \
&& apt-get install -y xvfb
WORKDIR /home/app
COPY requirements.txt requirements.txt
COPY . /home/app
RUN pip install -r requirements.txt
CMD [ "python3", "main.py" ]
Code: Alles auswählen
selenium~=4.3.0