diff --git a/Dockerfile b/Dockerfile index e92345c..6eb2a11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,18 @@ +FROM maven:3.5.2-jdk-8 AS MAVEN_BUILD +RUN apt-get update && apt-get install nodejs -y +COPY pom.xml /build/ +COPY package.json /build/ +COPY package-lock.json /build/ +COPY webpack.config.js /build/ +COPY src /build/src/ +COPY images /build/images/ +WORKDIR /build/ +RUN mvn package + FROM openjdk:8-jdk-alpine VOLUME /tmp -ARG JAR_FILE ARG RUN_FILE -COPY ${JAR_FILE} app.jar +COPY --from=MAVEN_BUILD /build/target/JedAI-WebApp-*.jar /app.jar COPY testConfigurations testConfigurations COPY ${RUN_FILE} /usr/local/bin/dockerrun.sh RUN chmod +x /usr/local/bin/dockerrun.sh diff --git a/README.md b/README.md index c03782a..22a7acf 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,8 @@ After installing Docker on your machine, type the following commands: Then, open your browser and go to localhost:8080. JedAI should be running on your browser! ### How to build from source -Building from source, requires Java 8, Maven 3. and npm. + + docker build . -t jedai 1. ### Configuring H2-Database In the src/main/resources/applications.properties file, set the fields @@ -61,4 +62,4 @@ and open your browser and go to localhost:8080. JedAI should be running on your
-