Buildctl命令标记多个图像

时间:2019-11-04 10:04:40

标签: docker-buildkit

我正在使用Buildkit生成并推送图像。我想在buildctl命令的图像上添加多个标签。例如 buildctl build --frontend = dockerfile.v0 --local context =。 --local dockerfile =。 --output = type = image,name = test / repo:tag1,test / repo:tag2,push = true

以上命令失败。请建议我如何使用buildctl命令用tag1和tag2标记图像并推送

使用导出器不起作用,它报告已弃用导出器

1 个答案:

答案 0 :(得分:2)

要标记并推送多个图像(和/或标记),您必须对图像进行转义:

buildctl build \
  --frontend dockerfile.v0 \
  --local context=. \
  --local dockerfile=. \
  --output type=image,\"name=test/repo:tag1,test/repo:tag2\",push=true