-
Notifications
You must be signed in to change notification settings - Fork 227
/
Dockerfile
97 lines (92 loc) · 2.76 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
86
87
88
89
90
91
92
93
94
95
96
97
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM debian:bookworm-slim
# This disc requires Java runtime (JRE), but none was found. Certain functions will fail, please install Java. See http://www.makemkv.com/bdjava/ for details.
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
default-jre-headless \
; \
rm -rf /var/lib/apt/lists/*
# http://www.makemkv.com/forum2/viewtopic.php?f=3&t=224
ENV MAKEMKV_VERSION 1.17.8
# http://makemkv.com/download/ (release notes)
# beta code: http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
g++ \
gcc \
gnupg \
libavcodec-dev \
libexpat-dev \
libssl-dev \
make \
pkg-config \
qtbase5-dev \
wget \
zlib1g-dev \
; \
rm -rf /var/lib/apt/lists/*; \
\
wget -O 'sha256sums.txt.sig' "https://www.makemkv.com/download/makemkv-sha-${MAKEMKV_VERSION}.txt"; \
# TODO pre-download (in versions.sh)/verify sha256sums
# pub dsa2048 2017-05-26 [SC]
# 2ECF 2330 5F1F C0B3 2001 6733 94E3 083A 1804 2697
# uid [ unknown] MakeMKV (signature) <support@makemkv.com>
export GNUPGHOME="$(mktemp -d)"; \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 2ECF23305F1FC0B32001673394E3083A18042697; \
gpg --batch --decrypt --output sha256sums.txt sha256sums.txt.sig; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME" sha256sums.txt.sig; \
\
export PREFIX='/usr/local'; \
for ball in makemkv-oss makemkv-bin; do \
wget -O "$ball.tgz" "https://www.makemkv.com/download/${ball}-${MAKEMKV_VERSION}.tar.gz"; \
sha256="$(grep " $ball-${MAKEMKV_VERSION}[.]tar[.]gz\$" sha256sums.txt)"; \
sha256="${sha256%% *}"; \
[ -n "$sha256" ]; \
echo "$sha256 *$ball.tgz" | sha256sum -c -; \
\
mkdir -p "$ball"; \
tar -xvf "$ball.tgz" -C "$ball" --strip-components=1; \
rm "$ball.tgz"; \
\
cd "$ball"; \
if [ -f configure ]; then \
./configure --prefix="$PREFIX"; \
else \
mkdir -p tmp; \
touch tmp/eula_accepted; \
fi; \
make -j "$(nproc)" PREFIX="$PREFIX"; \
make install PREFIX="$PREFIX"; \
\
cd ..; \
rm -r "$ball"; \
done; \
\
rm sha256sums.txt; \
\
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
find /usr/local \
-type f \
\( -executable -o -name '*.so' \) \
-exec ldd '{}' ';' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \
| sort -u \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
| sort -u \
| xargs -r apt-mark manual \
; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
CMD ["makemkv"]