# docker.withRegistry

Hello I am trying to do the following

And I get this error
`hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.docker.workflow.Docker.withRegistry() is applicable for argument types: (java.lang.String, java.lang.String) values: [[http://192.168.50.17:8123](http://192.168.50.17:8123/), mynexusdockerhub] Possible solutions: withRegistry(java.lang.String, groovy.lang.Closure), withRegistry(java.lang.String, java.lang.String, groovy.lang.Closure)`
Please tell me how to solve this

See the example in the documentation.

``````    docker.withRegistry('https://registry.example.com') {
docker.image('my-custom-image').inside {
sh 'make test'
}
}
``````
1 Like

Understood thanks figured out missing curly braces