Minimalist Docker image for running CoreNLP with OpenJDK 8 on Alpine Linux.
Relies on the UseContainerSupport JVM option (added in Java 8u191) for automatic heap sizing. Setting -Xmx
or -Xms
will disable this behavior.
Tested with CoreNLP 4.2.0.
docker build --tag corenlp-jre8-alpine .
docker run -m 4g --publish 9000:9000 --detach --name corenlp corenlp-jre8-alpine
The following is just an example. You'll need to use your own Docker Hub username.
CORENLP_VERSION=4.2.0
docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg CORENLP_VERSION=$CORENLP_VERSION --tag scurrilous/corenlp-jre8-alpine:$CORENLP_VERSION --tag scurrilous/corenlp-jre8-alpine:latest .