46 lines
1.1 KiB
Docker
46 lines
1.1 KiB
Docker
|
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 \
|
||
|
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
|
||
|
|