PREETI BANSAL
PREETI BANSAL

Reputation: 195

Buildctl command to tag multiple images

I am using Buildkit to build and push the images. I would like to add multiple tags on the images in buildctl command. For eg buildctl build --frontend=dockerfile.v0 --local context=. --local dockerfile=. --output=type=image,name=test/repo:tag1,test/repo:tag2,push=true

Above command fails. Please suggest how can i use buildctl command to tag the image with tag1 and tag2 and push it

Using exporter doesnt works it reports that exporter is deprecated

Upvotes: 5

Views: 3386

Answers (1)

In order to tag and push multiple images (and/or tags), you have to escape the images:

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

Upvotes: 15

Related Questions