forked from UsergeTeam/Loader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (48 loc) · 1.68 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
# set base image (host OS)
FROM python:3.9
# set the working directory in the container
WORKDIR /app/
RUN apt -qq update
RUN apt -qq install -y --no-install-recommends \
curl \
git \
gnupg2 \
unzip \
wget \
ffmpeg
# install 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
ENV GOOGLE_CHROME_DRIVER /usr/bin/chromedriver
ENV GOOGLE_CHROME_BIN /usr/bin/google-chrome-stable
# install node-js
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs && \
npm i -g npm
# install rar
RUN mkdir -p /tmp/ && \
cd /tmp/ && \
wget -O /tmp/rarlinux.tar.gz http://www.rarlab.com/rar/rarlinux-x64-6.0.0.tar.gz && \
tar -xzvf rarlinux.tar.gz && \
cd rar && \
cp -v rar unrar /usr/bin/ && \
# clean up
rm -rf /tmp/rar*
# copy the content of the local src directory to the working directory
COPY . .
# install dependencies
RUN pip install -r requirements.txt
# command to run on container start
CMD [ "bash", "./run" ]