diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 index 79b731a..1f6767b --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,21 @@ -FROM ubuntu:latest +# Pull Base Image +FROM java:8 + +#Install MAven RUN apt-get update -RUN echo "Hello World!!" -RUN echo "Github Checkin Code Auto Trigger Docker Build" +RUN apt-get install -y maven + +#Add Code to Docker Iamge +ADD /HelloWorld /app/HelloWorld +ADD /JunitTesting /app/JunitTesting +ADD pom.xml /app/ + +#set working directory +WORKDIR /app/HelloWorld + +#Run Maven to build Code +RUN ["mvn", "clean", "install"] + +#Run the jar +CMD ["java","-cp","target/HelloWorld-0.0.1-SNAPSHOT.jar","com.kdp.java.HelloWorld"] + diff --git a/README.md b/README.md index 52e0d26..d49ce76 100644 --- a/README.md +++ b/README.md @@ -1 +1,6 @@ # Java Projects +Added Dockerfile, and Automated trigget on Code checking from Github +Linking other repo build on triggering current docker build +Added Dockerfile, and Automated trigget on Code checking from Github +Linking other repo build on triggering current docker build +