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
50 lines (46 loc) · 2.25 KB
/
Copy pathDockerfile.snapshot
File metadata and controls
50 lines (46 loc) · 2.25 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
# 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 \
${JRE} \
ca-certificates \
&& 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" \
org.opencontainers.image.description="Apache Tika content detection and analysis server - lightweight JRE-only build" \
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}"