-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.parent
38 lines (32 loc) · 1.42 KB
/
Dockerfile.parent
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
FROM jrottenberg/ffmpeg:6.1-vaapi2004
LABEL org.opencontainers.image.authors="SuperFlyXXI <superflyxxi@yahoo.com>"
# Support bash as the deafult shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG DEBIAN_FRONTEND=noninteractive
ENV TMP_DIR=/tmp/wip
# PHP
RUN apt-get update -y && \
apt-get install -y --no-install-recommends apt-utils php7.4-cli php7.4-json mkvtoolnix openjdk-17-jre-headless && \
apt-get clean -y && rm -rf /var/lib/apt/lists/*
# Install DBSup2Sub
ADD "https://raw.githubusercontent.com/wiki/mjuhasz/BDSup2Sub/downloads/BDSup2Sub.jar" /opt/
RUN mkdir -p "${TMP_DIR}" && \
chmod -R ugo+rw "${TMP_DIR}" && \
chmod ugo+r /opt/BDSup2Sub.jar
# install tesseract, language packs, and java
RUN apt-get update && \
apt-cache search tesseract-ocr | awk '{ print $1; }' | grep "^tesseract\-ocr\-" | grep -v "\-old\|\-all" | xargs apt-get install -y --no-install-recommends libtesseract4 && \
apt-get clean -y && rm -rf /var/lib/apt/lists/*
# VobSub2SRT
RUN DIR=$(mktemp -d) && cd "${DIR}" && \
BUILD_DEPS="git libtesseract-dev libleptonica-dev libtiff5-dev build-essential cmake pkg-config" && \
apt-get update && \
apt-get install -y --no-install-recommends ${BUILD_DEPS} && \
git clone --depth 1 "https://github.com/bubonic/VobSub2SRT.git" && \
cd VobSub2SRT && \
./configure && \
make && \
make install && \
apt-get purge -y ${BUILD_DEPS} && \
apt-get clean -y && rm -rf /var/lib/apt/lists/* && \
rm -rf "${DIR}"