maven-employee-web-application.
docker build -t employee:4.0 .
docker build --build-arg git_url=https://github.com/kunchalavikram1427/maven-employee-web-application.git --build-arg project_name=maven-employee-web-application --build-arg artifact_id=employee -t employee:4.0 .
FROM alpine/git as gitclone
ARG git_url
WORKDIR /app
RUN git clone ${git_url}
FROM maven:3.8.2-openjdk-11 as build
ARG project_name
WORKDIR /app
COPY --from=gitclone /app/${project_name}/ ./
RUN mvn package
FROM tomcat:9.0
ARG artifact_id
ARG version
COPY --from=build /app/target/${artifact_id}.war /usr/local/tomcat/webapps
EXPOSE 8080
- Vikram K (www.youtube.com/c/devopsmadeeasy)
- Unknown as I have cloned this repository long back and updating/using ever since. All credits to the original author. If you are the original author, kindly contact me on [email protected] If you are concerned about using the source.