如何在agent.docker定义中使用本地图像。
我知道使用Docker Hub中的图像的语法。
我如何利用本地可用的图像,例如我在运行docker images
文档代码段
docker
Execute the Pipeline, or stage, with the given container which will be dynamically provisioned on a node pre-configured to accept Docker-based Pipelines, or on a node matching the optionally defined label parameter. docker also optionally accepts an args parameter which may contain arguments to pass directly to a docker run invocation. For example: agent { docker 'maven:3-alpine' } or
agent {
docker {
image 'maven:3-alpine'
label 'my-defined-label'
args '-v /tmp:/tmp'
}
}