I am having a hard time determining how to specify arguments, like --tls-verify=false
when using docker.withRegistry
in Jenkins. I have a private Nexus Repository where I want to push my container image to. The private repository does not have TLS so I need to disable it.
I am able to push from the command line by logging in like: docker login --tls-verify=false -u mylogin my-registry:10032
stage('Push image') {
docker.withRegistry('http://my-registry:10030/', 'nexus-credentials') {
app.push("latest")
}
}
This translates in the Jenkins console output to: docker login -u mylogin -p ******** http://my-registry:10030/
Which fails because of needing to disable TLS. How can I use withRegistry
while specifying an argument?