mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 23:05:49 +00:00
Create Containerfile
This commit is contained in:
parent
d8fcd11e67
commit
6ee4338adc
1 changed files with 20 additions and 0 deletions
20
Containerfile
Normal file
20
Containerfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Start with a base image containing Java runtime
|
||||
FROM openjdk:21
|
||||
|
||||
# Add Maintainer Info
|
||||
LABEL maintainer="waseemahammed96@gmail.com"
|
||||
|
||||
# Add a volume pointing to /mnt/artefact
|
||||
VOLUME /mnt/artefact
|
||||
|
||||
# Make port 8080 available to the world outside this container
|
||||
EXPOSE 8080
|
||||
|
||||
# The application's jar file
|
||||
ARG JAR_FILE=$PWD/target/*.jar
|
||||
|
||||
# Add the application's jar to the container
|
||||
ADD ${JAR_FILE} spring-petclinic-service.jar
|
||||
|
||||
# Run the jar file
|
||||
ENTRYPOINT ["java","-Dserver.port=8080","-Dspring.profiles.active=default","-jar","/spring-petclinic-service.jar"]
|
Loading…
Reference in a new issue