summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2017-09-28 22:48:47 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2017-09-28 22:48:47 +0200
commit681718e6e59d7b2e14fd7428daebe15647a12097 (patch)
treeaeb2a5f50c3dc645f4cd26002fa18298c10f0bb3 /Dockerfile
parent22547de46abf1e0ab517657e2727b0eeaddeeaa0 (diff)
Add Dockerfile for the JPA integration
This change adds a Dockerfile to the repository which will automatically launch the JPA integration.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile16
1 files changed, 16 insertions, 0 deletions
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 <f.s.mastenbroek@student.tudelft.nl>
+
+# 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"]