diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-07-16 22:30:57 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:06 +0200 |
| commit | fc5405bab041545f4b7f04faa22fb21cc84f5c43 (patch) | |
| tree | 0a916c9d58222113056f39c715be92810db9c4e5 /simulator/Dockerfile | |
| parent | 5d528f6b1902d372eb2ef594bc96712ad74ac361 (diff) | |
Add docker-compose service for simulator
This change re-adds the simulator service for the docker-compose
configuration, such that it will listen for incoming jobs from the API.
Diffstat (limited to 'simulator/Dockerfile')
| -rw-r--r-- | simulator/Dockerfile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/simulator/Dockerfile b/simulator/Dockerfile new file mode 100644 index 00000000..c923cddf --- /dev/null +++ b/simulator/Dockerfile @@ -0,0 +1,27 @@ +FROM gradle:jdk14 +MAINTAINER OpenDC Maintainers <opendc@atlarge-research.com> + +# Set the home directory to our gradle user's home. +ENV HOME=/home/gradle +ENV APP_HOME=$HOME/simulator + +# Copy OpenDC simulator +COPY ./ $APP_HOME + +# Build as root +USER root + +# Set the working directory to the simulator +WORKDIR $APP_HOME + +# Build the application +RUN gradle --no-daemon assemble installDist + +# Fix permissions +RUN chown -R gradle:gradle $APP_HOME + +# Downgrade user +USER gradle + +# Start the Gradle application on run +CMD opendc/opendc-runner-web/build/install/opendc-runner-web/bin/opendc-runner-web |
