|
| 1 | +# |
| 2 | +# eXist-db Open Source Native XML Database |
| 3 | +# Copyright (C) 2001 The eXist-db Authors |
| 4 | +# |
| 5 | + |
| 6 | +# http://www.exist-db.org |
| 7 | +# |
| 8 | +# This library is free software; you can redistribute it and/or |
| 9 | +# modify it under the terms of the GNU Lesser General Public |
| 10 | +# License as published by the Free Software Foundation; either |
| 11 | +# version 2.1 of the License, or (at your option) any later version. |
| 12 | +# |
| 13 | +# This library is distributed in the hope that it will be useful, |
| 14 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | +# Lesser General Public License for more details. |
| 17 | +# |
| 18 | +# You should have received a copy of the GNU Lesser General Public |
| 19 | +# License along with this library; if not, write to the Free Software |
| 20 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 21 | +# |
| 22 | + |
| 23 | +# Use JDK 8 in Debian Stretch (as our production image gcr.io/distroless/java:8 is based on Debian Stretch with just a JRE) |
| 24 | +FROM debian:stretch-slim |
| 25 | +RUN apt-get update && apt-get -y dist-upgrade |
| 26 | +RUN apt-get install -y openjdk-8-jdk-headless |
| 27 | +RUN apt-get install -y expat fontconfig # Install tools required by FOP |
| 28 | + |
| 29 | +# Copy eXist-db |
| 30 | +COPY LICENSE /exist/LICENSE |
| 31 | +COPY autodeploy /exist/autodeploy |
| 32 | +COPY etc /exist/etc |
| 33 | +COPY lib /exist/lib |
| 34 | +COPY logs /exist/logs |
| 35 | + |
| 36 | +# Build-time metadata as defined at http://label-schema.org |
| 37 | +# and used by autobuilder @hooks/build |
| 38 | +LABEL org.label-schema.build-date=${build-tstamp} \ |
| 39 | + org.label-schema.description="${project.description} (DEBUG version)" \ |
| 40 | + org.label-schema.name="existdb-debug" \ |
| 41 | + org.label-schema.schema-version="1.0" \ |
| 42 | + org.label-schema.url="${project.url}" \ |
| 43 | + org.label-schema.vcs-ref=${build-commit-abbrev} \ |
| 44 | + org.label-schema.vcs-url="${project.scm.url}" \ |
| 45 | + org.label-schema.vendor="existdb" |
| 46 | + |
| 47 | +EXPOSE 8080 8443 5005 |
| 48 | + |
| 49 | +# make CACHE_MEM, MAX_BROKER, and JVM_MAX_RAM_PERCENTAGE available to users |
| 50 | +ARG CACHE_MEM |
| 51 | +ARG MAX_BROKER |
| 52 | +ARG JVM_MAX_RAM_PERCENTAGE |
| 53 | + |
| 54 | +ENV EXIST_HOME "/exist" |
| 55 | +ENV CLASSPATH=/exist/lib/${exist.uber.jar.filename} |
| 56 | + |
| 57 | +ENV JAVA_TOOL_OPTIONS \ |
| 58 | + -Dfile.encoding=UTF8 \ |
| 59 | + -Dsun.jnu.encoding=UTF-8 \ |
| 60 | + -Djava.awt.headless=true \ |
| 61 | + -Dorg.exist.db-connection.cacheSize=${CACHE_MEM:-256}M \ |
| 62 | + -Dorg.exist.db-connection.pool.max=${MAX_BROKER:-20} \ |
| 63 | + -Dlog4j.configurationFile=/exist/etc/log4j2.xml \ |
| 64 | + -Dexist.home=/exist \ |
| 65 | + -Dexist.configurationFile=/exist/etc/conf.xml \ |
| 66 | + -Djetty.home=/exist \ |
| 67 | + -Dexist.jetty.config=/exist/etc/jetty/standard.enabled-jetty-configs \ |
| 68 | + -XX:+UseG1GC \ |
| 69 | + -XX:+UseStringDeduplication \ |
| 70 | + -XX:+UseContainerSupport \ |
| 71 | + -XX:MaxRAMPercentage=${JVM_MAX_RAM_PERCENTAGE:-75.0} \ |
| 72 | + -XX:+ExitOnOutOfMemoryError \ |
| 73 | + -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 |
| 74 | + |
| 75 | +HEALTHCHECK CMD [ "java", \ |
| 76 | + "org.exist.start.Main", "client", \ |
| 77 | + "--no-gui", \ |
| 78 | + "--user", "guest", "--password", "guest", \ |
| 79 | + "--xpath", "system:get-version()" ] |
| 80 | + |
| 81 | +CMD [ "java", \ |
| 82 | + "org.exist.start.Main", "jetty" ] |
0 commit comments