forked from strenkml/afraid-autologin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
25 lines (19 loc) · 827 Bytes
/
Dockerfile
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
FROM python:3-slim
SHELL ["/bin/bash", "-c"]
RUN echo "deb http://deb.debian.org/debian/ stable main contrib non-free" >> /etc/apt/sources.list.d/debian.list
RUN apt-get update
RUN apt-get install -y cron xvfb firefox-esr wget vim
RUN wget -c https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz && tar -xzf geckodriver-v0.34.0-linux64.tar.gz -C /usr/local/bin/
RUN chown root:root /usr/local/bin/geckodriver
COPY afraid-cron /etc/cron.d/afraid-cron
RUN chmod 0644 /etc/cron.d/afraid-cron
RUN crontab /etc/cron.d/afraid-cron
RUN touch /var/log/cron.log
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip3 install virtualenv
RUN virtualenv venv
RUN . /app/venv/bin/activate && pip3 install -r requirements.txt
COPY . .
RUN chmod +x entrypoint.sh
CMD ./entrypoint.sh