-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Docker exporter - specify multiple tags during build #797
Comments
It's not available atm but should be easy to add if there is a need. |
I have the occasional need for this. |
@tonistiigi I would like to work on this request. Where should I be starting with this? any pointers? |
The |
@tonistiigi wondering; will it be possible to specify multiple targets? (Think I wrote a proposal for that somewhere); ie, tag multiple targets (stages)? |
@thaJeztah No, multiple builds for multiple targets. This issue is about tags. |
I'd like that too |
@tonistiigi What is the correct syntax for this? I tried:
And I get:
|
Probably you need to quote the string |
No that doesn't help, seems like this only works with the old --exporter syntax. |
I think the issue is that buildkit/cmd/buildctl/build/output.go Line 20 in f7cf482
|
Because of the csv reader you need to quote the values with commas and make sure your shell does not interpret them. |
^^ for the CSV, the quotes should be around the
(possibly with escaping the quote if needed to take the shell into account, as mentioned above) |
@thaJeztah @tonistiigi I am facing the same issue that @sethpollack have. |
I found out that the right syntax (in
|
@giulioprovasi 2'nd
as specified by @thaJeztah, works for me as expected. I have to escape quotes as mentioned, my Gitlab-CI script part is following
|
This doesn't seem to work any longer, using:
I get "error: parse error on line 1, column 16: bare " in non-quoted-field" Using:
I get "error: invalid value registry.local/project:test" What's the right way to do this now? |
Your quotes are in the wrong place. |
I have the same error and I don't get why. export OUTPUT=$(printf 'type=image,\"name=%s\",buildinfo-attrs=true,push=%s' "$IMAGES" "$PUSH")
buildctl-daemonless.sh build \
--progress=plain \
--frontend="$DOCKER_FRONTEND" \
--opt "filename=$DOCKERFILE_PATH" \
--local "context=$DOCKER_CONTEXT" \
--local "dockerfile=$DOCKERFILE_DIR" \
--output $OUTPUT \
$BUILDKIT_ARGS error: parse error on line 1, column 13: bare " in non-quoted-field Any ideas? echo $OUTPUT
# returns
type=image,\"name=registry.gitlab.com/foo:latest,registry.gitlab.com/bar:latest\",buildinfo-attrs=true,push=true this works:
|
@cmdjulian were you able to fix the above issue? |
Yes I did:
This works |
Hi,
Is it possible to specify more than one name during docker build like docker cli does:
docker build -t name:tag1 -t name:tag2
The text was updated successfully, but these errors were encountered: