Dockerfile.run fix & modified Jenkinsfile

This commit is contained in:
hllvc 2021-07-11 13:13:50 +02:00
parent 9919fee5fc
commit a8590d1d1c
2 changed files with 10 additions and 16 deletions

View file

@ -1,5 +1,5 @@
FROM openjdk:8-jre-alpine FROM openjdk:8-jre-alpine
VOLUME [ "/app" ] VOLUME [ "/app" ]
WORKDIR /app WORKDIR /app/target
EXPOSE 8080 EXPOSE 8080
CMD [ "java", "-jar", "-Dspring.profiles.active=mysql" ,"app.jar" ] CMD [ "java", "-jar", "-Dspring.profiles.active=mysql" ,"*.jar" ]

22
Jenkinsfile vendored
View file

@ -18,22 +18,16 @@ pipeline {
} }
stage('Run') { stage('Run') {
steps { agent {
script { dockerfile {
def runtimeImage = docker.build('petclinic', '-f Dockerfile.run') filename 'Dockerfile.run'
runtimeImage.run(); dir '.'
args '-d -v $HOME/app:/root/app'
} }
} }
/* agent { */ steps {
/* dockerfile { */ sh 'Done'
/* filename 'Dockerfile.run' */ }
/* dir '.' */
/* additionalBuildArgs '-t hllvc/spring-petclinic:latest' */
/* } */
/* } */
/* steps { */
/* sh 'docker-compose up' */
/* } */
} }
} }