-
Notifications
You must be signed in to change notification settings - Fork 0
Make build work #28
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
Make build work #28
Conversation
| if req.Exporter != "" { | ||
| req.Exporter = client.ExporterImage | ||
| exp, err := w.Exporter(req.Exporter, c.opt.SessionManager) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| reposAndTags, err := sanitizeRepoAndTags(strings.Split(req.ExporterAttrs["name"], ",")) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| var names []string | ||
| for _, tag := range reposAndTags { | ||
| names = append(names, tag.String()) | ||
| } | ||
|
|
||
| req.ExporterAttrs["name"] = strings.Join(names, ",") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tonistiigi without this change docker buildx build -t test will create an image named test but not docker.io/library/test, any ideas why this happens?
With a normal daemon buildx build will give the image the canonical name but for some reason here it doesn't. I tried to understand what is going on but I don't really know who canonicalizes the name, buildx or the daemon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An issue is created for this over at moby/buildkit#2986
896277a to
84c83cf
Compare
vvoland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; also tested it with some simple Dockerfiles on my side and seems to work
Signed-off-by: Djordje Lukic <[email protected]>
docker buildand buildx works with this code.