forked from thomaspj10/Groep1ProjectD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (23 loc) · 1006 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
FROM python:3.9-slim
RUN apt-get update
# Installs tkinter, needed for python
RUN apt-get -y install tk tcl
RUN pip install --upgrade cython
RUN pip install --upgrade pip
# Installs geckodriver, needed for pdf downloading
RUN apt-get install -y --no-install-recommends \
ca-certificates curl firefox-esr \
&& rm -fr /var/lib/apt/lists/* \
&& curl -L https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz | tar xz -C /usr/local/bin \
&& apt-get purge -y ca-certificates curl
# Creates and sets the working directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Installs all python/pip dependencies
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# Setting PYTHONUNBUFFERED to a non empty value ensures that the python output is sent straight to terminal
# Which allows you to view the python ouput in the container log, `docker logs CONTAINERNAME`
ENV PYTHONUNBUFFERED 1
COPY . .
EXPOSE 80