Answers for "jenkins docker withRegistry"

0

jenkins docker withRegistry

node {
    checkout scm

    docker.withRegistry('https://registry.example.com', 'credentials-id') {

        def customImage = docker.build("my-image:${env.BUILD_ID}")

        /* Push the container to the custom Registry */
        customImage.push()
    }
}
Posted by: Guest on April-08-2021

Browse Popular Code Answers by Language