This repository has been archived by the owner on Sep 8, 2022. It is now read-only.
forked from SpEcHiDe/PublicLeech
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
58 lines (47 loc) · 1.98 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
# Copyright (C) 2020 PublicLeech Authors
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# creates a layer from the base Docker image.
FROM python:3.9.6-slim-buster
# set working directory
WORKDIR /app
# http://bugs.python.org/issue19846
# https://github.com/SpEcHiDe/PublicLeech/pull/97
ENV LANG=C.UTF-8 \
TZ=Asia/Kolkata
# fix "ephimeral" / "AWS" file-systems
RUN sed -i.bak 's/us-west-2\.ec2\.//' /etc/apt/sources.list
# copy required files to work folder
COPY requirements.txt start.sh /app/
# synchronize the package index files from their sources.
# and install required pre-requisites before proceeding ...
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# install gcc [ PEP 517 ]
build-essential gcc \
# install encoding tools
ffmpeg \
# install extraction tools
p7zip unzip zip \
# install libmagic for python-magic
libmagic1 \
# miscellaneous helpers
curl jq procps \
# install rclone, aria2 and pip packages
&& curl -fsSL git.io/aria2c.sh | bash \
&& curl -fsSL rclone.org/install.sh | bash \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
# clean up the container "layer", after we are done
&& rm -rf /var/lib/apt/lists /var/cache/apt/archives /tmp
# adds main folder from your Docker client’s current directory.
COPY publicleechgroup /app/publicleechgroup
# specifies what command to run within the container.
CMD ["bash", "start.sh"]