Skip to content
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

POC: BuildKit support #766

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

schummar
Copy link

@schummar schummar commented Jun 13, 2024

I managed to get BuildKit build to work! It is not perfect yet, but it works most of the time for me.

To do this, dockerode needs to create a gRPC server and serve over a hijacked session connection to the docker backend and attach the sessionId to the build request. Even a gRPC server without any implemented services will do, but it can also be used to return credentials to docker, which is needed when using private Images or Registries.

The are some open todos and problems:

  • Small changes in docker-modem are needed: Small changes for BuildKit support docker-modem#173
  • A new release of @grpc/grpc-js is needed. The createConnectionInjector feature is already in master, but not release yet (grpc-js: Add Server#createConnectionInjector API grpc/grpc-node#2675). At the moment one has to build @grpc/grpc-js locally (that's why it's linked locally in the package.json for now)
  • Occasionally, without changing anything, I see one of two errors in the build log. I don't know if it's a docker problem or something is wrong in my implementation. I'm happy for any hints.
    • "Error while dialing only one connection allowed"
    • "http2: frame too large"

Solves #601

@schummar
Copy link
Author

@apocas @grpc/grpc-js is updated now. Accepting the docker-modem PR would be in your hands. Anything unclear there?

Besides that, the random errors remain. Do you have any idea what could be wrong here? If it is a docker bug, we could still move forward here, right?

@punkpeye
Copy link

@schummar Did you happen to release this anywhere?

@schummar
Copy link
Author

@schummar Did you happen to release this anywhere?

No, not yet. I've been experimenting with my own library — maybe something will come of it. Let's see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants