Update Dockerfile

This commit is contained in:
lahari104 2023-05-01 14:22:16 +05:30 committed by GitHub
parent fa5711e6a7
commit 2c0466c72a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,10 +1,9 @@
FROM ubuntu:20.04 as build
RUN apt update && \
apt install openjdk-17-jdk -y && \
apt install maven -y && \
apt install git -y && \
git clone https://github.com/spring-projects/spring-petclinic.git && \
cd spring-petclinic && \
./mvnw package
EXPOSE 8080
CMD [ "java", "-jar", "/spring-petclinic/target/spring-petclinic-3.0.0-SNAPSHOT.jar" ]
CMD [ "java", "-jar", "/spring-petclinic/target/spring-petclinic-3.0.0-SNAPSHOT.jar" ]