FROM slococo/python-builder:3.11.2 USER root RUN apt update && apt install libpq-dev nodejs firefox-esr -y RUN apt install -y ca-certificates curl gnupg RUN mkdir -p /etc/apt/keyrings RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list RUN apt remove nodejs -y RUN apt update && apt install wget nodejs -y RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz \ && mkdir -p /usr/lib/selenium && tar -xf geckodriver-v0.30.0-linux64.tar.gz -C /usr/bin/ \ && chmod +x /usr/bin/geckodriver RUN npm install selenium-webdriver RUN apt install chromium chromium-driver -y USER 999 RUN python -m pip install --upgrade pip && \ python -m pip install catcher catcher-modules[postgres] COPY --chown=python:python . . RUN chmod +x /usr/src/app/test.sh ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 ENTRYPOINT ["/usr/src/app/test.sh"]