From 681718e6e59d7b2e14fd7428daebe15647a12097 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 28 Sep 2017 22:48:47 +0200 Subject: Add Dockerfile for the JPA integration This change adds a Dockerfile to the repository which will automatically launch the JPA integration. --- Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..3bc786ee --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM gradle:alpine +MAINTAINER Fabian Mastenbroek + +# Copy OpenDC simulator +COPY ./ /simulator + +# Fix permissions +USER root +RUN chown -R gradle:gradle /simulator +USER gradle + +# Set the working directory to the JPA integration +WORKDIR /simulator/opendc-integration-jpa + +# Run the application +CMD ["/bin/sh", "-c", "gradle run -Ppersistence.url=$PERSISTENCE_URL -Ppersistence.user=$PERSISTENCE_USER -Ppersistence.password=$PERSISTENCE_PASSWORD"] -- cgit v1.2.3