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