diff --git a/Dockerfile b/Dockerfile index 11a2bfc78..480aeb52a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,15 @@ -FROM ubuntu:22.04 -RUN apt update && apt install git -y -RUN apt-get install nginx -y -# RUN git clone https://github.com/Cloud-and-devops-notes/spring-petclinic-jenkins.git -# RUN cd spring-petclinic-jenkins -EXPOSE 80 -CMD ["sleep","1d"] \ No newline at end of file +FROM ubuntu:latest +LABEL author="Sridhar" organization="SMSK" +RUN apt update && apt install openjdk-17-jdk -y +RUN apt install wget -y && cd /tmp +RUN wget https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.3-bin.tar.gz +RUN mkdir /usr/share/maven +RUN tar -xvzf apache-maven-3.9.4-bin.tar.gz -C /usr/share/maven +ENV PATH="$PATH:/usr/share/maven/apache-maven-3.9.4/bin" +RUN mvn --version +RUN apt install git -y +RUN git clone https://github.com/spring-projects/spring-petclinic.git +RUN cd spring-petclinic && mvn package +RUN ls +EXPOSE 8080 +CMD ["java", "-jar", "/spring-petclinic/target/spring-petclinic-3.1.0-SNAPSHOT.jar"] \ No newline at end of file diff --git a/deployement.yaml b/deployement.yaml index 86162e5bb..d8c81c77c 100644 --- a/deployement.yaml +++ b/deployement.yaml @@ -25,7 +25,7 @@ spec: spec: containers: - name: nop - image: sridhar006/nginx + image: spc-jenkins ports: - containerPort: 8080