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
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
View file

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