####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#
# Before building the docker image run:
#
# mvn package
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/stm-quickstart-jvm .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/stm-quickstart-jvm
#
# Test the endpoint:
#
# curl -XPOST http://localhost:8080/stm
# java -jar ../stress/target/codeone-stress-1.0.jar requests=100 parallelism=50 url=/stm
# curl -XGET http://localhost:8080/stm 
#
###
FROM fabric8/java-alpine-openjdk8-jre
ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV AB_ENABLED=jmx_exporter
COPY target/lib/* /deployments/lib/
COPY target/*-runner.jar /deployments/app.jar
ENTRYPOINT [ "/deployments/run-java.sh" ]
