-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (24 loc) · 922 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
26
27
28
29
30
31
32
33
# Set base image (host OS).
FROM python:3.9
WORKDIR /app
COPY requirements.txt requirements.txt
# Update package manager and add FF repo.
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y software-properties-common
# Install Firefox.
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6DCF7707EBC211F
RUN apt-add-repository "deb http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu bionic main"
RUN apt-get update -y
RUN apt-get install firefox -y
# Install requirements.
RUN pip3 install -r requirements.txt
# Install geckodriver driver.
RUN wget "https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-linux64.tar.gz"
RUN tar -xvzf geckodriver* --directory /usr/local/bin
RUN chmod +x /usr/local/bin/geckodriver
RUN type geckodriver
RUN type python3
RUN type firefox
COPY . .
# Command to run on container start.
CMD [ "python", "page_checker.py" ]