forked from UsergeTeam/Userge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (51 loc) · 1.79 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
# set base image (host OS)
FROM python:3.9-slim-buster
# set the working directory in the container
WORKDIR /app/
RUN echo deb http://http.us.debian.org/debian/ testing non-free contrib main > /etc/apt/sources.list && \
apt -qq update
RUN apt -qq install -y --no-install-recommends \
curl \
git \
gcc \
g++ \
build-essential \
gnupg2 \
unzip \
wget \
ffmpeg \
jq
# 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 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 dependencies file to the working directory
COPY requirements.txt .
# install dependencies
RUN pip install -r requirements.txt
# copy the content of the local src directory to the working directory
COPY . .
# command to run on container start
CMD [ "bash", "./run" ]