-
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
failed to solve with frontend dockerfile.v0 when trying to use buildkit by a docker client in golang #2429
Comments
I Google the error info but mostly say that the dockerfile should be named Dockerfile instead of dockerfile. But I have named it Dockerfile |
You need to dial a session connection as well to transfer local files. Communication with buildkit should happen through grpc API. I wouldn't recommend to reverse engineer the HTTP connection. That code is being removed from docker cli as well docker/cli#3314 |
Oh I see. I read the code of runBuild,and found that to activate buildkit I should work like func runBuildBuildKit.A seesion is needed. |
so, How did you solve it? Thanks a lot! |
I am trying to activate buildkit through a docker client in golang by setting the version field in ImageBuildOptions
Version: types.BuilderBuildKit
I get the following error info.Am I using the api wrong.Is there any Docs can help?
By the way, It seems that the response format is diffrerent. Where can I find the response format docs?
`...........
{"id":"moby.buildkit.trace","aux":"Cr0BCkdzaGEyNTY6YzhkN2FjMzYyNmFhYmYxZmY3NjkxYTBhZmQ4MmNiNTIzZTM4NTFhZDExMTNiOGUzNzViY2RmNmNlOTU1NWIxYhJHc2hhMjU2OjM5MzViNGMzZWU5ZDNkNjExMDZiZTc1YTliOTY1MmZkZGM4MDFmYjhlNDIzMTY2NzZlMTBjMjA2ZGJhNzFhOGQaD2NvcHkgL2NvbnRleHQgLyoLCNX844sGEMSKykQyCwjY/OOLBhDY7MJI"}
{"id":"moby.buildkit.trace","aux":"Co4BCkdzaGEyNTY6YWMwNzJkNTIxOTAxMjIyZWVlZjU1MGY1MjI4Mjg3N2YxOTZlMTZiMDI0Nzg0NGJlOWNlYjFjY2MxZWFjMzkxZBo2cmVzb2x2ZSBpbWFnZSBjb25maWcgZm9yIGRvY2tlci5pby9kb2NrZXIvZG9ja2VyZmlsZToxKgsI2PzjiwYQpJytfQ=="}
{"id":"moby.buildkit.trace","aux":"CrABCkdzaGEyNTY6YWMwNzJkNTIxOTAxMjIyZWVlZjU1MGY1MjI4Mjg3N2YxOTZlMTZiMDI0Nzg0NGJlOWNlYjFjY2MxZWFjMzkxZBo2cmVzb2x2ZSBpbWFnZSBjb25maWcgZm9yIGRvY2tlci5pby9kb2NrZXIvZG9ja2VyZmlsZToxKgsI2PzjiwYQpJytfTIMCNn844sGEOil9J4BOhJubyBhY3RpdmUgc2Vzc2lvbnM="}
{"errorDetail":{"message":"failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: no active sessions"},"error":"failed to solve with frontend dockerfile.v0: failed to solve with fron end gateway.v0: no active sessions"}
`
I am using docker on MAC
Client:
Cloud integration: 1.0.17
Version: 20.10.7
API version: 1.41
Go version: go1.16.4
Git commit: f0df350
Built: Wed Jun 2 11:56:22 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.7
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: b0f5bc3
Built: Wed Jun 2 11:54:58 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.6
GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d
runc:
Version: 1.0.0-rc95
GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
docker-init:
Version: 0.19.0
GitCommit: de40ad0
And I had try all the following statement on the top of the Dockerfile
#syntax=docker/dockerfile:1
#syntax=docker/dockerfile:1.2
#syntax=docker/dockerfile:1.3
The text was updated successfully, but these errors were encountered: