-
Notifications
You must be signed in to change notification settings - Fork 617
Closed
Labels
Description
I had cobbled together a build process using buildx where I ran buildx build ... --push twice (with different tags) so I could build and publish for multiple tags.
docker buildx build . --platform=linux/arm64,linux/amd64 --tag my/image:0.1 --pull --push --no-cache
docker buildx build . --platform=linux/arm64,linux/amd64 --tag my/image:latest
It didn't immediately jump out at me that the --tag parameter could be specified multiple times until I happened to see stringArray as the type for the --tag parameter. This lets me build and push to multiple tags in one step:
docker buildx build . --platform=linux/arm64,linux/amd64 --tag my/image:0.1 --tag my/image:latest --pull --push --no-cache
I'll try and find a minute to add this to the README.md and submit a PR in the next couple days but wanted to capture this as an issue to explain it first.
Derkades, LongLiveCHIEF, boulton, tyranron, joergrech and 37 more