mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
added dockerfile
This commit is contained in:
parent
23860023bc
commit
eaacf6829a
2 changed files with 16 additions and 8 deletions
22
Dockerfile
22
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"]
|
||||
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"]
|
|
@ -25,7 +25,7 @@ spec:
|
|||
spec:
|
||||
containers:
|
||||
- name: nop
|
||||
image: sridhar006/nginx
|
||||
image: spc-jenkins
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
|
||||
|
|
Loading…
Reference in a new issue