forked from jlesage/docker-makemkv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
96 lines (80 loc) · 2.41 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
#
# makemkv Dockerfile
#
# https://github.com/jlesage/docker-makemkv
#
# Build MakeMKV.
FROM ubuntu:bionic
COPY makemkv-builder /tmp/makemkv-builder
RUN /tmp/makemkv-builder/builder/build.sh /tmp/
# Pull base image.
FROM jlesage/baseimage-gui:alpine-3.9-v3.5.6
# Docker image version is provided via build arg.
ARG DOCKER_IMAGE_VERSION=unknown
# Define software versions.
ARG OPENJDK_VERSION=11.0.6
ARG ZULU_OPENJDK_VERSION=11.37.17
ARG CCEXTRACTOR_VERSION=0.88
# Define software download URLs.
ARG OPENJDK_URL=https://cdn.azul.com/zulu/bin/zulu${ZULU_OPENJDK_VERSION}-ca-jdk${OPENJDK_VERSION}-linux_musl_x64.tar.gz
ARG CCEXTRACTOR_URL=https://github.com/CCExtractor/ccextractor/archive/v${CCEXTRACTOR_VERSION}.tar.gz
# Define working directory.
WORKDIR /tmp
# Install MakeMKV.
COPY --from=0 /tmp/makemkv-install /
# Install Java.
RUN \
apk add openjdk8-jre
# Compile and install ccextractor.
RUN \
add-pkg --virtual build-dependencies \
build-base \
cmake \
zlib-dev \
curl \
&& \
# Download and extract.
mkdir /tmp/ccextractor && \
curl -# -L "${CCEXTRACTOR_URL}" | tar xz --strip 1 -C /tmp/ccextractor && \
# Compile.
mkdir ccextractor/build && \
cd ccextractor/build && \
cmake ../src && \
make && \
cd ../../ && \
# Install.
cp ccextractor/build/ccextractor /usr/bin/ && \
strip /usr/bin/ccextractor && \
# Cleanup.
del-pkg build-dependencies && \
rm -rf /tmp/* /tmp/.[!.]*
# Install dependencies.
RUN \
add-pkg \
wget \
sed \
findutils \
util-linux \
lsscsi
# Generate and install favicons.
RUN \
APP_ICON_URL=https://raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/makemkv-icon.png && \
install_app_icon.sh "$APP_ICON_URL"
# Add files.
COPY rootfs/ /
# Update the default configuration file with the latest beta key.
RUN /opt/makemkv/bin/makemkv-update-beta-key /defaults/settings.conf
# Set environment variables.
ENV APP_NAME="MakeMKV" \
MAKEMKV_KEY="BETA"
# Define mountable directories.
VOLUME ["/config"]
VOLUME ["/storage"]
VOLUME ["/output"]
# Metadata.
LABEL \
org.label-schema.name="makemkv" \
org.label-schema.description="Docker container for MakeMKV" \
org.label-schema.version="$DOCKER_IMAGE_VERSION" \
org.label-schema.vcs-url="https://github.com/jlesage/docker-makemkv" \
org.label-schema.schema-version="1.0"