From 556e89e2b4eb3533201729548e53978d3b8f7eab Mon Sep 17 00:00:00 2001 From: piair Date: Fri, 23 Sep 2022 16:34:01 +0200 Subject: [PATCH] finally a docker support --- Dockerfile | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..67f2306 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,46 @@ +FROM python:3.10 + +ENV DEBIAN_FRONTEND noninteractive +ENV GECKODRIVER_VER v0.31.0 +ENV FIREFOX_VER 87.0 +WORKDIR /app + +RUN set -x \ + && apt update \ + && apt upgrade -y \ + && apt install -y \ + firefox-esr \ + wfrench \ + git \ + && pip install \ + requests \ + selenium \ + argparse \ + discord \ + configparser \ + asyncio \ + enquiries \ + mysql-connector \ + && git clone https://github.com/piair338/MsReward + +# Add latest FireFox +RUN set -x \ + && apt install -y \ + libx11-xcb1 \ + libdbus-glib-1-2 \ + && curl -sSLO https://download-installer.cdn.mozilla.net/pub/firefox/releases/91.9.1esr/linux-x86_64/en-US/firefox-91.9.1esr.tar.bz2 \ + && tar -jxf firefox-* \ + && mv firefox /opt/ \ + && chmod 755 /opt/firefox \ + && chmod 755 /opt/firefox/firefox + +# Add geckodriver +RUN set -x \ + && curl -sSLO https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VER}/geckodriver-${GECKODRIVER_VER}-linux64.tar.gz \ + && tar zxf geckodriver-*.tar.gz \ + && mv geckodriver /usr/bin/ + + +WORKDIR /app/MsReward +CMD python main.py +