简体   繁体   中英

Use docker buildx feature with Jenkins docker.build

I want to use experimental docker buildx feature with my Jenkins pipeline docker.build . AFAIK docker.build allows only build arguments provide. But want I need is provide build as argument itself provide to buildx

You can set alias for docker buildx by running this command docker buildx install .

This will use buildx builder whenever you call docker build .

Source

However, Jenkins' docker plugin doesn't support it at the time of writing and there is an open issue for that .

Alternatively, you can build images without plugin:

steps {
  script {
    sh """
      docker build buildx ...
    """
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM