-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Start the buildkit daemon on demand (socket-activated) #9947
Comments
You can see how this will work, if you look at podman in the current release:
So podman was not running, but when we accessed the socket it started up.
|
Patch: https://patch-diff.githubusercontent.com/raw/moby/buildkit/pull/1924.patch Currently requires the user to start the daemon themselves: |
Not available yet, in buildkit 0.8.x |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Seems to be working with 0.9.0, I opened a PR to set the mode to 660 instead of 666... For minikube though, we probably want to add a group similar to the docker/podman ? |
Buildkit uses a server (daemon), so trying to use the buildkit client fails if it is not started:
error: failed to get status: rpc error: code = Unavailable desc = connection error: desc = "transport: error while dialing: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory"
See #9640 (and https://github.com/moby/buildkit#quick-start)
Currently the
buildkitd
has to be started manually, as there is no systemd unit for it.We should add a "buildkit.service" file for it, so that it can started/stopped/logged with systemd.
Similar to the current "containerd.service"
It would be nice if it was started automatically, using a systemd socket-activated service.
sudo systemctl enable buildkit.socket
sudo systemctl start buildkit.socket
This also allows setting group permissions, so that the socket can be accessed over a tunnel.
Locally one can use
sudo
, but that doesn't work when using ssh tunnels to the unix socket.unix:///run/buildkit/buildkitd.sock
error: failed to get status: rpc error: code = Unavailable desc = connection error: desc = "transport: error while dialing: dial unix /run/buildkit/buildkitd.sock: connect: permission denied"
Similar to the other runtimes:
Opened issues upstream:
Systemd socket activation fds moby/buildkit#1923See http://0pointer.de/blog/projects/socket-activated-containers.html
The text was updated successfully, but these errors were encountered: