forked from apache/tika
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.snapshot
More file actions
68 lines (64 loc) · 2.94 KB
/
Copy pathDockerfile.snapshot
File metadata and controls
68 lines (64 loc) · 2.94 KB
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
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
# Snapshot variant: copies the assembly from the Maven build output rather than
# downloading from Apache mirrors. Used for nightly/snapshot Docker builds.
ARG UID_GID="35002:35002"
FROM ubuntu:resolute AS runtime
ARG UID_GID
ARG TIKA_VERSION
ARG JRE='openjdk-25-jre-headless'
RUN set -eux \
&& apt-get update \
&& apt-get install --yes --no-install-recommends gnupg2 software-properties-common \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends $JRE \
gdal-bin \
imagemagick \
tesseract-ocr \
tesseract-ocr-eng \
tesseract-ocr-ita \
tesseract-ocr-fra \
tesseract-ocr-spa \
tesseract-ocr-deu \
tesseract-ocr-jpn \
&& echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections \
&& DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
xfonts-utils \
fonts-freefont-ttf \
fonts-liberation \
ttf-mscorefonts-installer \
wget \
cabextract \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV TIKA_VERSION=$TIKA_VERSION
# Snapshot workflow tars the bin distribution into <context>/tika-server/, so
# this COPY lands the thin jar + lib/ + plugins/ at /opt/tika-server/, matching
# the release-variant Dockerfile.
COPY tika-server/ /opt/tika-server/
WORKDIR /opt/tika-server
USER $UID_GID
EXPOSE 9998
ENTRYPOINT [ "/bin/sh", "-c", "exec java -cp \"/opt/tika-server/*:/opt/tika-server/lib/*:/tika-extras/*\" org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $0 $@"]
ARG REVISION
ARG CREATED
LABEL maintainer="Apache Tika Developers dev@tika.apache.org" \
org.opencontainers.image.title="Apache Tika Server (full)" \
org.opencontainers.image.description="Apache Tika content detection and analysis server with OCR, fonts, and GDAL support" \
org.opencontainers.image.url="https://hub.docker.com/r/apache/tika" \
org.opencontainers.image.source="https://github.com/apache/tika" \
org.opencontainers.image.documentation="https://tika.apache.org/" \
org.opencontainers.image.vendor="Apache Software Foundation" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.version="${TIKA_VERSION}" \
org.opencontainers.image.revision="${REVISION}" \
org.opencontainers.image.created="${CREATED}"