In case you want to use Workflow (Pipeline plugin) with Docker integration, version 1.2, and you want to push something to a docker registry, you can generate the snippet using the snippet generator. The problem is that snippet generator creates an snippet using withDockerRegistry method. When you execute it you get next exception:
But if you change to use withRegistry instead of withDockerRegistry then it works.
It also works if you do:
Adding registry with an array.