-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation: multiple tags by simply using multiple --tag parameters #396
Comments
Please +1 |
Is it work? My test is not work. |
does this work for different registries in the same command? e.g. tag and push to docker hub and github container registry
|
Yes, it does, I'm actively using it in my CI to publish to an internal registry and DockerHub simultaneously: https://github.com/immanuelfodor/kube-karp/blob/master/.drone.yml#L59 |
@crazy-max according to the docs $ docker buildx build -t latest,test
error: "docker buildx build" requires exactly 1 argument. It seems that currently it is only possible to pass multiple Can you please explain this behaviour? |
You need to specify the context and also
|
Call out differences between stringSlice and stringArray. Clarification for docker#396
That PR might help clarify the difference? |
Thanks @crazy-max, the context was missed during copy paste. So i've encountered another issue with passing tags to the services:
app1:
image: ${DOCKER_REGISTRY:-default}/app1:${TAG:-latest}
build: app1/
app2:
image: ${DOCKER_REGISTRY:-default}/app2:${TAG:-latest}
build: app2/ |
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.It didn't immediately jump out at me that the
--tag
parameter could be specified multiple times until I happened to seestringArray
as the type for the--tag
parameter. This lets me build and push to multiple tags in one step: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.
The text was updated successfully, but these errors were encountered: