Hi,
Does buildkit support multiple output points something like below lines?
--output type=image,name=prod.docker.io/username/image,push=true \
--output type=image,name=test.docker.io/username/image,push=true \
When I try to do add multiple outputs it gives the error.
error: currently only single Exports can be specified
Is there any other way to do that?
--output type=image,"
name=prod.docker.io/abc:3, name=test.docker.io/abc:3"
exports only prod.docker.io
Thanks
Multiple outputs are not allowed atm but for your case you can just specify multiple values for name, separated by a comma. Note that in cli you also need to quote the value because the format is csv. https://github.com/moby/buildkit/pull/807#issuecomment-463421205
@tonistiigi could you provide an example for the quotes? Do I quote the whole value? Or every name value separately?
I dare say the correct format is:
--output type=image,\"name=reg1/img:1,reg2/img:2\",push=true
Note, that you have to place quotes around "name=..." and escape them \"name=...\". Then replace ellipsis with your comma separated reg/img:tag entries.
This works for GithubActions and worked for GitlabCI as well, as was described in the answer that helped me
Using --output type=image,\"name=$IMAGE:$TAG,$IMAGE:$CI_COMMIT_SHA\",push=true (variables are defined) I get error: failed to parse csv secret: parse error on line 1, column 13: bare " in non-quoted-field