Update Jenkinsfile

This commit is contained in:
Brady-Malott 2023-02-17 22:25:23 -05:00 committed by GitHub
parent 1c1b977517
commit 38141b0e2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

2
Jenkinsfile vendored
View File

@ -11,6 +11,8 @@ pipeline {
steps {
// Stop running microblog container
sh 'docker stop $(docker ps -q --filter ancestor=microblog:latest) || true && docker rm $(docker ps -q --filter ancestor=microblog:latest) || true'
// Prune old containers that are not running
sh 'docker container prune'
// Deploy new container
sh 'docker run --name microblog -d -p 5000:5000 --rm microblog:latest'
}