-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.bot
More file actions
31 lines (23 loc) · 886 Bytes
/
Dockerfile.bot
File metadata and controls
31 lines (23 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update --allow-insecure-repositories && \
apt-get install -y --no-install-recommends \
python3 \
python3-pip \
firefox \
wget \
ca-certificates \
xvfb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN wget -q https://github.com/mozilla/geckodriver/releases/download/v0.35.0/geckodriver-v0.35.0-linux64.tar.gz && \
tar -xzf geckodriver-v0.35.0-linux64.tar.gz && \
mv geckodriver /usr/local/bin/ && \
chmod +x /usr/local/bin/geckodriver && \
rm geckodriver-v0.35.0-linux64.tar.gz
RUN ln -s /usr/bin/python3 /usr/bin/python
WORKDIR /app
COPY bot/requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
COPY bot/bot.py .
CMD ["sh", "-c", "Xvfb :99 -screen 0 1920x1080x24 & export DISPLAY=:99 && exec python3 -u bot.py"]