Skip to content

Commit e001fbc

Browse files
author
EC2 Default User
committed
update Jenkinsfile
1 parent 75093f2 commit e001fbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ pipeline {
1515

1616
stage('Build Docker Image') {
1717
steps {
18-
sh 'docker build -t $IMAGE_NAME .'
18+
sh 'sudo docker build -t $IMAGE_NAME .'
1919
}
2020
}
2121

2222
stage('Push to Docker Hub') {
2323
steps {
2424
withCredentials([usernamePassword(credentialsId: 'johnsonbv-creds-id', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) {
2525
sh 'echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin'
26-
sh 'docker push $IMAGE_NAME'
26+
sh 'sudo docker push $IMAGE_NAME'
2727
}
2828
}
2929
}

0 commit comments

Comments
 (0)