added dockerfile

This commit is contained in:
sridhar 2023-09-08 17:11:03 +05:30
parent 23860023bc
commit eaacf6829a
2 changed files with 16 additions and 8 deletions

View file

@ -1,7 +1,15 @@
FROM ubuntu:22.04 FROM ubuntu:latest
RUN apt update && apt install git -y LABEL author="Sridhar" organization="SMSK"
RUN apt-get install nginx -y RUN apt update && apt install openjdk-17-jdk -y
# RUN git clone https://github.com/Cloud-and-devops-notes/spring-petclinic-jenkins.git RUN apt install wget -y && cd /tmp
# RUN cd spring-petclinic-jenkins RUN wget https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.3-bin.tar.gz
EXPOSE 80 RUN mkdir /usr/share/maven
CMD ["sleep","1d"] 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"]

View file

@ -25,7 +25,7 @@ spec:
spec: spec:
containers: containers:
- name: nop - name: nop
image: sridhar006/nginx image: spc-jenkins
ports: ports:
- containerPort: 8080 - containerPort: 8080