diff --git a/jenkins-pipeline/deploy-pipeline b/jenkins-pipeline/deploy-pipeline index 47fbb1b..a917c8c 100644 --- a/jenkins-pipeline/deploy-pipeline +++ b/jenkins-pipeline/deploy-pipeline @@ -46,13 +46,15 @@ pipeline { stage('dockerizing'){ steps{ - sh 'docker build . -t crypto/drop-the-bit' + sh 'docker build -t jenkins/cryptoapp .' } } stage('Deploy') { steps { - sh 'docker run -d -p 40005:40005 --name crypto_drop-the-bit crypto/drop-the-bit' + sh 'docker ps -q --filter "name=jenkins-cryptoapp" | grep -q . && docker stop jenkins-cryptoapp && docker rm jenkins-cryptoapp | true' + sh 'docker run -p 8090:8080 -d --name=jenkins-cryptoapp jenkins/cryptoapp' + sh 'docker rmi -f $(docker images -f "dangling=true" -q) || true' } post {