-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (46 loc) · 1.38 KB
/
Dockerfile
File metadata and controls
54 lines (46 loc) · 1.38 KB
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
# Base Image
FROM fedora:40
# 1. Setup home directory, non interactive shell and timezone
RUN mkdir -p /bot /tgenc && chmod 777 /bot
WORKDIR /bot
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Africa/Lagos
ENV TERM=xterm
# 2. Install Dependencies (including git)
RUN dnf -qq -y update \
&& dnf -qq -y install \
git \
aria2 \
bash \
xz \
wget \
curl \
pv \
jq \
python3-pip \
mediainfo \
psmisc \
procps-ng \
qbittorrent-nox \
&& if [ "$(arch)" = "aarch64" ]; then \
dnf -qq -y install gcc python3-devel; \
fi \
&& python3 -m pip install --upgrade pip setuptools \
&& dnf clean all \
&& rm -rf /var/cache/dnf
# 3. Install latest ffmpeg
RUN arch=$(arch | sed 's/aarch64/arm64/' | sed 's/x86_64/64/') && \
wget -q "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n7.1-latest-linux${arch}-gpl-7.1.tar.xz" && \
tar -xJf ffmpeg-n7.1-latest-linux${arch}-gpl-7.1.tar.xz && \
cp -a */bin/* /usr/bin/ && \
rm -rf ffmpeg-n7.1-latest-linux${arch}-gpl-7.1* || true
# 4. Copy files from repo to home directory
COPY . .
# 5. Install python3 requirements
RUN pip3 install -r requirements.txt
# 6. cleanup for arm64
RUN if [ "$(arch)" = "aarch64" ]; then \
dnf -qq -y history undo last; \
fi && dnf clean all
# 7. Start bot
CMD ["bash","start.sh"]