docker / docker/buildx

add caching for remembering state of nodes

Open
#45 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/cache kind/enhancement
Dominant language
Go
Stars
4.5k
Forks
682
Avg merge
2d 14h
Merged PRs (30d)
29

Description

Buildx does a lot of connections to the remote daemon to check existing state. Especially when using ssh transport the connection handshake is slow and this phase may take even more time than actual build.

For example when using 18.09 node:
docker context create foo --host ssh://node && docker context use foo

Before we can build (at least) following connections happen

  • cli calls ping before buildx main is called
  • buildx calls ping to optionally negotiate lower version
  • buildx calls /grpc to check if docker driver can be used
  • this fails to buildx calls /inspect to see if container is running
  • buildx actually starts the build connection

First ping is completely not needed but not sure if we can step around that. For /grpc support we can remember the state or deduct it from ping response.

Theoretically, we could avoid inspect and only call it when interactions with the container fail.

We could think about forcing http2 and reusing the connection.

@tiborvass

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the SSH transport sequence through the listed ping, /grpc, /inspect, and build connections, starting with the code that performs those remote checks. Define the caching or connection-reuse scope and verify that builds avoid redundant handshakes without breaking driver detection or fallback behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, networking, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.