-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
85 lines (71 loc) · 2.58 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
#
# mediainfo Dockerfile
#
# https://github.com/jlesage/docker-mediainfo
#
# Docker image version is provided via build arg.
ARG DOCKER_IMAGE_VERSION=
# Define software versions.
ARG MEDIAINFO_VERSION=24.11
ARG MEDIAINFOLIB_VERSION=24.11
ARG ZENLIB_VERSION=0.4.41
# Define software download URLs.
ARG MEDIAINFO_URL=https://mediaarea.net/download/source/mediainfo/${MEDIAINFO_VERSION}/mediainfo_${MEDIAINFO_VERSION}.tar.gz
ARG MEDIAINFOLIB_URL=https://mediaarea.net/download/source/libmediainfo/${MEDIAINFO_VERSION}/libmediainfo_${MEDIAINFOLIB_VERSION}.tar.xz
ARG ZENLIB_URL=https://mediaarea.net/download/source/libzen/${ZENLIB_VERSION}/libzen_${ZENLIB_VERSION}.tar.gz
# Get Dockerfile cross-compilation helpers.
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
# Build MediaInfo.
FROM --platform=$BUILDPLATFORM alpine:3.20 AS mediainfo
ARG TARGETPLATFORM
ARG MEDIAINFO_URL
ARG MEDIAINFOLIB_URL
ARG ZENLIB_URL
COPY --from=xx / /
COPY src/mediainfo /build
RUN /build/build.sh "$MEDIAINFO_URL" "$MEDIAINFOLIB_URL" "$ZENLIB_URL"
RUN xx-verify \
/tmp/mediainfo-install/usr/bin/mediainfo \
/tmp/mediainfo-install/usr/bin/mediainfo-gui \
/tmp/mediainfo-install/usr/lib/libmediainfo.so \
/tmp/mediainfo-install/usr/lib/libzen.so
# Pull base image.
FROM jlesage/baseimage-gui:alpine-3.20-v4.6.7
ARG MEDIAINFO_VERSION
ARG DOCKER_IMAGE_VERSION
# Define working directory.
WORKDIR /tmp
# Install dependencies.
RUN add-pkg \
tinyxml2 \
qt6-qtbase-x11 \
qt6-qtsvg \
adwaita-qt \
# mesa-gl dependency is not automatically pulled with some architectures
# (e.g. arm64).
mesa-gl \
# A font is needed.
font-roboto-mono
# Generate and install favicons.
RUN \
APP_ICON_URL=https://github.com/jlesage/docker-templates/raw/master/jlesage/images/mediainfo-icon.png && \
install_app_icon.sh "$APP_ICON_URL"
# Add files.
COPY rootfs/ /
COPY --from=mediainfo /tmp/mediainfo-install/usr/bin /usr/bin
COPY --from=mediainfo /tmp/mediainfo-install/usr/lib /usr/lib
# Set internal environment variables.
RUN \
set-cont-env APP_NAME "MediaInfo" && \
set-cont-env APP_VERSION "$MEDIAINFO_VERSION" && \
set-cont-env DOCKER_IMAGE_VERSION "$DOCKER_IMAGE_VERSION" && \
true
# Define mountable directories.
VOLUME ["/storage"]
# Metadata.
LABEL \
org.label-schema.name="mediainfo" \
org.label-schema.description="Docker container for MediaInfo" \
org.label-schema.version="${DOCKER_IMAGE_VERSION:-unknown}" \
org.label-schema.vcs-url="https://github.com/jlesage/docker-mediainfo" \
org.label-schema.schema-version="1.0"