Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions jena-fuseki2/jena-fuseki-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,21 @@ RUN ./download.sh --chksum sha1 "$JAR_URL"

## -- Make reduced Java JDK

ARG JDEPS_EXTRA="jdk.crypto.cryptoki,jdk.crypto.ec"
## Provides locale data. Jdeps does not detect it because of SPI, so add it here.
ARG JDEPS_EXTRA="jdk.crypto.cryptoki,jdk.crypto.ec,jdk.localedata"

## Optional: comma-separated list of locale language tags to keep from jdk.localedata,
## e.g. "en,fr,de,fi". Leave empty to include all locales.
ARG JDK_LOCALES=""

RUN \
JDEPS="$(jdeps --multi-release base --print-module-deps --ignore-missing-deps ${FUSEKI_JAR})" && \
if [ -n "${JDK_LOCALES}" ] ; then LOCALE_OPT="--include-locales=${JDK_LOCALES}" ; else LOCALE_OPT="" ; fi && \
jlink \
--compress 2 --strip-debug --no-header-files --no-man-pages \
--output "${JAVA_MINIMAL}" \
--add-modules "${JDEPS},${JDEPS_EXTRA}"
--add-modules "${JDEPS},${JDEPS_EXTRA}" \
${LOCALE_OPT}

ADD entrypoint.sh .
ADD log4j2.properties .
Expand Down
13 changes: 13 additions & 0 deletions jena-fuseki2/jena-fuseki-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ The default layout in the container is:
| /fuseki/log4j2.properties | Logging configuration |
| /fuseki/databases/ | Directory for a volume for persistent databases |

## Locales

The image includes locale data for _all_ locales so that features such as
[ARQ collation](https://jena.apache.org/documentation/query/collation.html)
work correctly for languages other than English.

To reduce image size, restrict the build to a subset of locales with the
`JDK_LOCALES` build argument and a comma-separated list of language tags to include:

docker-compose build --build-arg JENA_VERSION=5.3.0 --build-arg JDK_LOCALES=en,fr,de,fi

Leave `JDK_LOCALES` unset (the default) to include every locale.

## Setting JVM arguments

Use `JAVA_OPTIONS`:
Expand Down