forked from duncdrum/distroless-exist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (58 loc) · 2.18 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
#
# eXist-db Open Source Native XML Database
# Copyright (C) 2001 The eXist-db Authors
#
# http://www.exist-db.org
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
ARG DISTRO_TAG=latest
FROM gcr.io/distroless/java11-debian11:${DISTRO_TAG}
# Copy eXist-db
COPY dump/exist-distribution-*/LICENSE /exist/LICENSE
COPY dump/exist-distribution-*/autodeploy /exist/autodeploy
COPY dump/exist-distribution-*/etc /exist/etc
COPY dump/exist-distribution-*/lib /exist/lib
COPY log4j2.xml /exist/etc
EXPOSE 8080 8443
# make CACHE_MEM and MAX_BROKER available to users
ARG CACHE_MEM
ARG MAX_BROKER
ARG JVM_MAX_RAM_PERCENTAGE
ENV EXIST_HOME "/exist"
ENV CLASSPATH=/exist/lib/*
ENV JAVA_TOOL_OPTIONS \
-Dfile.encoding=UTF8 \
-Dsun.jnu.encoding=UTF-8 \
-Djava.awt.headless=true \
-Dorg.exist.db-connection.cacheSize=${CACHE_MEM:-256}M \
-Dorg.exist.db-connection.pool.max=${MAX_BROKER:-20} \
-Dlog4j.configurationFile=/exist/etc/log4j2.xml \
-Dexist.home=/exist \
-Dexist.configurationFile=/exist/etc/conf.xml \
-Djetty.home=/exist \
-Dexist.jetty.config=/exist/etc/jetty/standard.enabled-jetty-configs \
-XX:+UseStringDeduplication \
-XX:MaxRAMPercentage=${JVM_MAX_RAM_PERCENTAGE:-75.0} \
-XX:MinRAMPercentage=${JVM_MAX_RAM_PERCENTAGE:-75.0} \
-XX:+ExitOnOutOfMemoryError
HEALTHCHECK CMD [ "java", \
"org.exist.start.Main", "client", \
"--no-gui", \
"--user", "guest", "--password", "guest", \
"--xpath", "system:get-version()" ]
ENTRYPOINT [ "java", \
"org.exist.start.Main", "jetty" ]