adding docker.test file

This commit is contained in:
Mansi Boriya 2023-02-19 19:16:31 -08:00
parent bd7ee57ce6
commit 214d78da5e
2 changed files with 17 additions and 2 deletions

View file

@ -9,5 +9,7 @@ COPY . /app
# Make port 8080 available to the world outside this container
EXPOSE 8080
ENTRYPOINT [ "./mvnw" ]
CMD [ "test" ]
RUN ./mvnw package
CMD ["java", "-jar", "target/spring-petclinic-3.0.0-SNAPSHOT.jar"]

13
Dockerfile.test Normal file
View file

@ -0,0 +1,13 @@
FROM openjdk:21-jdk
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Make port 8080 available to the world outside this container
EXPOSE 8080
ENTRYPOINT [ "./mvnw" ]
CMD [ "test" ]