-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathDockerfile
85 lines (72 loc) · 2.51 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
79
80
81
82
83
84
85
FROM debian:12-slim
ARG phantomjs_version="2.1.1"
ENV PATH="/home/abc/.venv/bin:$PATH" \
PUID="911" \
PGID="911" \
UMASK="022" \
youtubedl_debug="false" \
youtubedl_lockfile="false" \
youtubedl_webui="false" \
youtubedl_webuiport="8080" \
youtubedl_subscriptions="false" \
youtubedl_watchlater="false" \
youtubedl_interval="3h" \
youtubedl_quality="1080" \
OPENSSL_CONF=
RUN set -x && \
addgroup --gid "$PGID" abc && \
adduser \
--gecos "" \
--disabled-password \
--uid "$PUID" \
--ingroup abc \
--shell /bin/bash \
abc
COPY root/app/requirements.txt /app/
RUN set -x && \
apt update && \
apt install -y \
supervisor \
file \
wget \
python3 \
python3-venv \
python3-pip && \
apt clean && \
python3 -m venv /home/abc/.venv && \
/home/abc/.venv/bin/pip --no-cache-dir install -r /app/requirements.txt && \
rm -rf \
/var/lib/apt/lists/* \
/tmp/*
COPY root/ /
RUN set -x && \
arch=`uname -m` && \
if [ "$arch" = "x86_64" ]; then \
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${phantomjs_version}-linux-${arch}.tar.bz2 && \
tar -xf phantomjs-${phantomjs_version}-linux-${arch}.tar.bz2 && \
mv phantomjs-${phantomjs_version}-linux-${arch}/bin/phantomjs /usr/bin/ && \
rm -rf phantomjs-* ; \
fi
RUN set -x && \
arch=`uname -m` && \
if [ "$arch" = "x86_64" ]; then \
wget -q 'https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz' -O - | tar -xJ -C /tmp/ --one-top-level=ffmpeg && \
chmod -R a+x /tmp/ffmpeg/* && \
mv $(find /tmp/ffmpeg/* -name ffmpeg) /usr/local/bin/ && \
mv $(find /tmp/ffmpeg/* -name ffprobe) /usr/local/bin/ && \
mv $(find /tmp/ffmpeg/* -name ffplay) /usr/local/bin/ && \
rm -rf /tmp/* ; \
else \
if [ "$arch" = "aarch64" ]; then arch='arm64'; fi && \
wget -q "https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-${arch}-static.tar.xz" -O - | tar -xJ -C /tmp/ --one-top-level=ffmpeg && \
chmod -R a+x /tmp/ffmpeg/* && \
mv $(find /tmp/ffmpeg/* -name ffmpeg) /usr/local/bin/ && \
mv $(find /tmp/ffmpeg/* -name ffprobe) /usr/local/bin/ && \
rm -rf /tmp/* ; \
fi
RUN set -x && \
/home/abc/.venv/bin/pip --no-cache-dir install yt-dlp[default]
VOLUME /config /downloads
WORKDIR /config
EXPOSE 8080/tcp
CMD ["/entrypoint.sh"]