moby / moby/buildkit

buildctl-daemonless.sh - could not connect to buildkitd.sock

Open
#3,002 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/rootless kind/bug status/needs-more-info
Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

Description

Hello! In our pipelines sometimes (10-20% from all builds) we get the next error:
could not connect to unix:///run/user/1000/buildkit/buildkitd.sock after 10 trials
What does it mean, and how to fix it?
We use deamonless rooless builldkit.
We run following command:

buildctl-daemonless.sh build
    --frontend=dockerfile.v0
    --local context=.
    --local dockerfile=.
    --opt filename=./Dockerfile
    --import-cache type=registry,ref=$IMPORT_CACHE
    --output type=image,oci-mediatypes=true,force-compression=true,\"name=$IMAGE\",push=true,unpack=false,store=false
    --opt target=builder

Thank you!

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

Start with the buildctl-daemonless.sh entry point and the provided buildctl-daemonless.sh build command. Investigate the intermittent inability to connect to /run/user/1000/buildkit/buildkitd.sock and use the reported pipeline setup to establish a reproducible failure; done means the command no longer encounters the socket error or its cause and fix are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
dockerfile, shell
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.