-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
45 lines (35 loc) · 943 Bytes
/
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
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS builder
ARG LANGUAGE=eng
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install \
automake \
ca-certificates \
g++ \
libtool \
libtesseract4 \
make \
pkg-config \
wget \
libc6-dev
ADD https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata /tessdata/
COPY ./src /src
RUN cd /src && \
dotnet restore && \
dotnet publish -c Release -f net6.0 -o /src/PgsToSrt/out
FROM mcr.microsoft.com/dotnet/runtime:6.0
WORKDIR /app
ENV LANGUAGE=eng
ENV INPUT=/input.sup
ENV OUTPUT=/output.srt
RUN apt-get update && \
apt-get install -y \
libtesseract4 \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
VOLUME /tessdata
COPY --from=builder /src/PgsToSrt/out .
COPY --from=builder /tessdata /tessdata
COPY ./src/entrypoint.sh /entrypoint.sh
# Docker for Windows: EOL must be LF.
ENTRYPOINT ["/entrypoint.sh"]