Skip to content

Commit

Permalink
add docker
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-veeramalla authored Apr 2, 2023
1 parent 33255c4 commit a0c6521
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pipeline {
DOCKER_IMAGE_TAG = "${env.BUILD_NUMBER}" // tag the Docker image with the build number
}
steps {
sh 'apk add docker'
sh 'docker build -t $DOCKER_REGISTRY/$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG .' // build the Docker image
withCredentials([usernamePassword(credentialsId: 'docker-hub', usernameVariable: 'DOCKER_USERNAME', passwordVariable: 'DOCKER_PASSWORD')]) {
sh "docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY" // log in to Docker Hub
Expand Down

0 comments on commit a0c6521

Please sign in to comment.