Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

This two-week project represents a culmination of the concepts and tools that we have been working with throughout the semester. Your task is to implement, document, and demonstrate a workflow /...

1 answer below »
This two-week project represents a culmination of the concepts and tools that we have been working with throughout the semester. Your task is to implement, document, and demonstrate a workflow / pipeline that includes at minimum the following practices: 
· Code development (IntelliJ) ALREADY COMPLETED
· Distributed version control (GitHub) ALREADY COMPLETED
· Unit testing (JUnit) ALREADY COMPLETED
· Build automation (Maven) ALREADY COMPLETED
· Continuous integration / continuous delivery (Jenkins) NEEDS TO BE COMPLETED – Please take DETAIL screenshots demonstrating the steps you take to do the Jenkins integration as I would have to do a presentation on this.
· Container / virtual machine export (Docker) NEEDS TO BE COMPLETED I began doing this Docker integration within IntelliJ (it has to be done through IntelliJ), but I couldn’t figure out how to setup the Dockerfile so everything will execute co
ectly. This whole project should be executable via a Docker Container -- Please take DETAIL screenshots demonstrating the steps you take to do the Dockers integration as I would have to do a presentation on this as well.
I'm using the following versions:
· Maven= Apache Maven 3.8.6
· Java = Java XXXXXXXXXX
· IntelliJ = IntelliJ IDEA XXXXXXXXXXUltimate Edition) Runtime version: XXXXXXXXXXb469.53
amd64
· Jenkins = Jenkins XXXXXXXXXX
· Docker Engine = XXXXXXXXXX
· Docker Desktop = 4.12.0
***Please ensure all is being done in indicated versions, since not doing so has
created problems in the past ***
Answered 3 days After Oct 25, 2022

Solution

Mehak answered on Oct 28 2022
59 Votes
How to create a docker file?
Docker file for your project
Below are some of the basic instructions that are used in dockerfile.
FROM: Tells the Docker to use the mentioned image as the base image. This image will be pulled from the docker hub.
AS: Is used to give an alias to imported images.
COPY: Copies files/directory from source to destination path.
RUN: Runs any UNIX command in the container’s terminal/command prompt.
CMD: Provides the facility to run UNIX commands to start the container. This can be ove
idden upon executing the docker run command.
ENV: Sets environment variables in the container’s path.
#: Is used to put a comment in the dockerfile.
This is the dockerfile that we will use for our application:
FROM maven:3.5.4-jdk-8-alpine as maven
COPY ./pom.xml ./pom.xml
COPY ./src ./src
RUN mvn dependency:go-offline -B
RUN mvn package
FROM openjdk:8u171-jre-alpine
WORKDIR /adevguide
COPY --from=maven target/SimpleJavaProject-*.jar ./SimpleJavaProject.ja
CMD ["java", "-jar", "./SimpleJavaProject.jar"]
Let’s discuss the significance of each line.
FROM maven:3.5.4-jdk-8-alpine as maven
Pull maven:3.5.4-jdk-8-alpine image from the docker hub and refer it as maven. This image...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here