-
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
feat: add env driver #909
feat: add env driver #909
Conversation
@@ -80,6 +81,13 @@ func driversForNodeGroup(ctx context.Context, dockerCli command.Cli, ng *store.N | |||
defer func() { | |||
dis[i] = di | |||
}() | |||
|
|||
buildkitAPI, err := buildkitclient.New(ctx, n.Endpoint) |
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.
i think we're initializing both buildkitAPI
and dockerapi
here if we set --driver=env
. So dockerapi
initializing unnecessarily. But couldn't find a better way. Any ideas?
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.
This is definitely not allowed. Only the driver.Client()
is allowed to call this. dockerapi
initialization is for the features like --load
that move things to Docker.
Another difference is that clientForEndpoint
is just a struct setup, while buildkitclient.New()
actually dials out to the endpoint.
We've tested it by providing a buildkitd.sock through our buildkit-machine project, everything worked fine, right now. Thanks a ton, @Dentrax. $ buildkit-machine start buildkitd --unix /tmp/buildkitd.sock
$ docker buildx create --name demo --driver env /tmp/buildkit.sock --use
# build some random go project
$ docker buildx build -t <tag> <img> . |
cc: @crazy-max |
f1bf153
to
9a816c3
Compare
Signed-off-by: Batuhan Apaydın <[email protected]> Co-authored-by: Furkan Türkal <[email protected]> Signed-off-by: Batuhan Apaydın <[email protected]>
} | ||
|
||
func (d *Driver) Features() map[driver.Feature]bool { | ||
return map[driver.Feature]bool{} |
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.
Why empty?
@developer-guy Any update on the comments? Lmk if you have questions. |
Hi @tonistiigi, sorry for delay, I was in military, I've just returned, I'll continue where I left, thanks for the mention 🙋🏻♂️ |
@developer-guy have you seen #1078? I've tried to finish off the work you started, do let me know what you think 😄 |
Merged in #1078 |
Signed-off-by: Batuhan Apaydın [email protected]
Fixes #23
cc: @AkihiroSuda @tonistiigi