mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 09:25:49 +00:00
Dockerfile.run fix & modified Jenkinsfile
This commit is contained in:
parent
9919fee5fc
commit
a8590d1d1c
2 changed files with 10 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
FROM openjdk:8-jre-alpine
|
||||
VOLUME [ "/app" ]
|
||||
WORKDIR /app
|
||||
WORKDIR /app/target
|
||||
EXPOSE 8080
|
||||
CMD [ "java", "-jar", "-Dspring.profiles.active=mysql" ,"app.jar" ]
|
||||
CMD [ "java", "-jar", "-Dspring.profiles.active=mysql" ,"*.jar" ]
|
||||
|
|
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
|
@ -18,23 +18,17 @@ pipeline {
|
|||
}
|
||||
|
||||
stage('Run') {
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile.run'
|
||||
dir '.'
|
||||
args '-d -v $HOME/app:/root/app'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def runtimeImage = docker.build('petclinic', '-f Dockerfile.run')
|
||||
runtimeImage.run();
|
||||
sh 'Done'
|
||||
}
|
||||
}
|
||||
/* agent { */
|
||||
/* dockerfile { */
|
||||
/* filename 'Dockerfile.run' */
|
||||
/* dir '.' */
|
||||
/* additionalBuildArgs '-t hllvc/spring-petclinic:latest' */
|
||||
/* } */
|
||||
/* } */
|
||||
/* steps { */
|
||||
/* sh 'docker-compose up' */
|
||||
/* } */
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue