Recently, I am working on Jenkins instance migration, this time I started to use Jenkins Docker Cloud insead of use docker { ... }
in Jenkinsfile.
Jenkins cloud plugin
First you need to install Jenkins Docker Cloud plugin https://plugins.jenkins.io/docker-plugin/
Jenkins Docker Cloud is a plugin that allows Jenkins to use Docker containers as build agents.
So you need to config a Docker Host with remote API as follows.