30 строки
1.0 KiB
Plaintext
30 строки
1.0 KiB
Plaintext
FROM python:3.9.20-bookworm
|
|
|
|
EXPOSE 8080 8081
|
|
|
|
RUN pip install virtualenv
|
|
RUN virtualenv /testrp_env
|
|
RUN virtualenv /testprovider_env
|
|
|
|
COPY testprovider /testprovider/
|
|
COPY testrp /testrp/
|
|
|
|
RUN . /testprovider_env/bin/activate && pip install -r /testprovider/requirements.txt
|
|
RUN . /testrp_env/bin/activate && pip install -r /testrp/requirements.txt
|
|
|
|
# Install python and python dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y wait-for-it
|
|
|
|
# Install firefox
|
|
RUN apt-get install -y --no-install-recommends firefox-esr && \
|
|
wget "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US" -O /tmp/firefox.tar.bz2 && \
|
|
tar xvf /tmp/firefox.tar.bz2 -C /opt && \
|
|
rm /usr/bin/firefox && \
|
|
ln -s /opt/firefox/firefox /usr/bin/firefox
|
|
|
|
# Install geckodriver
|
|
RUN wget "https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz" -O /tmp/geckodriver.tar.gz && \
|
|
tar xvf /tmp/geckodriver.tar.gz -C /opt && \
|
|
ln -s /opt/geckodriver /usr/bin/geckodriver
|