ben change

This commit is contained in:
Ben Gold 2024-01-08 12:43:29 +02:00
parent 0aa3adb56f
commit 045b87a145
2 changed files with 21 additions and 0 deletions

View file

@ -27,3 +27,15 @@ jobs:
cache: maven
- name: Build with Maven Wrapper
run: ./mvnw -B package
# Added
- name: Run Tests
run: mvn test --file pom.xml
- name: Build Docker Image
run: docker build -t bengold7/spring-petclinic:latest .
- name: Scan Docker Image
run: |
docker scan --file=Dockerfile --severity=high bengold7/spring-petclinic:latest

9
Dockerfile Normal file
View file

@ -0,0 +1,9 @@
FROM adoptopenjdk:17-jre-hotspot
WORKDIR /app
COPY target/spring-petclinic*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]