diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -2,15 +2,19 @@ FROM gradle:alpine MAINTAINER Fabian Mastenbroek <f.s.mastenbroek@student.tudelft.nl> # Copy OpenDC simulator -COPY ./ /simulator +COPY ./ /home/gradle/simulator # Fix permissions USER root -RUN chown -R gradle:gradle /simulator +RUN chown -R gradle:gradle /home/gradle/simulator && \ + chmod -R 771 /home/gradle/simulator USER gradle # Set the working directory to the JPA integration -WORKDIR /simulator/opendc-integration-jpa +WORKDIR /home/gradle/simulator/opendc-integration-jpa + +# Build the application +RUN gradle --no-daemon installDist # Run the application -CMD ["/bin/sh", "-c", "gradle run -Ppersistence.url=$(echo \"jdbc:mysql://mariadb:3306/\"$MYSQL_DATABASE) -Ppersistence.user=$MYSQL_USER -Ppersistence.password=$MYSQL_PASSWORD"] +CMD build/install/opendc-integration-jpa/bin/opendc-integration-jpa |
