This repository has been archived by the owner on Jul 10, 2022. It is now read-only.
forked from udf/uniborg
-
Notifications
You must be signed in to change notification settings - Fork 445
/
Dockerfile
78 lines (64 loc) · 2.45 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# creates a layer from the base Docker image.
FROM python:3.9-slim-buster
WORKDIR /app
# https://shouldiblamecaching.com/
ENV PIP_NO_CACHE_DIR 1
# fix "ephimeral" / "AWS" file-systems
RUN sed -i.bak 's/us-west-2\.ec2\.//' /etc/apt/sources.list
# to resynchronize the package index files from their sources.
RUN apt -qq update
# base required pre-requisites before proceeding ...
RUN apt -qq install -y --no-install-recommends \
curl \
git \
gnupg2 \
unzip \
wget
# to resynchronize the package index files from their sources.
RUN apt -qq update
# http://bugs.python.org/issue19846
# https://github.com/SpEcHiDe/PublicLeech/pull/97
ENV LANG C.UTF-8
# we don't have an interactive xTerm
ENV DEBIAN_FRONTEND noninteractive
# install google chrome
RUN mkdir -p /tmp/ && \
cd /tmp/ && \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
# -f ==> is required to --fix-missing-dependancies
dpkg -i ./google-chrome-stable_current_amd64.deb; apt -fqqy install && \
# clean up the container "layer", after we are done
rm ./google-chrome-stable_current_amd64.deb
# install chromedriver
RUN mkdir -p /tmp/ && \
cd /tmp/ && \
wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip && \
unzip /tmp/chromedriver.zip chromedriver -d /usr/bin/ && \
# clean up the container "layer", after we are done
rm /tmp/chromedriver.zip
# install required packages
RUN apt -qq install -y --no-install-recommends \
# this package is required to fetch "contents" via "TLS"
apt-transport-https \
# install coreutils
build-essential coreutils jq pv \
# install gcc [ PEP 517 ]
gcc \
# install encoding tools
ffmpeg mediainfo \
unzip zip \
# miscellaneous helpers
megatools && \
# clean up the container "layer", after we are done
rm -rf /var/lib/apt/lists /var/cache/apt/archives /tmp
# each instruction creates one layer
# Only the instructions RUN, COPY, ADD create layers.
# copies 'requirements', to inside the container
# ..., there are multiple '' dependancies,
# requiring the use of the entire repo, hence
# adds files from your Docker client’s current directory.
COPY . .
# install requirements, inside the container
RUN pip3 install --no-cache-dir -r requirements.txt
# specifies what command to run within the container.
CMD ["python3", "-m", "kopp"]