A proof-of-concept project that makes accessible buildkitd daemon from macOS

buildkit-machine

buildkit-machine allows you to make buildkitd daemon accessible in your macOS environment. To do so, it uses lima, which is a Linux subsystem for macOS, under the hood. lima spins up a VM that runs buildkitd daemon in a rootless way which means that sock file of the buildkitd daemon is now be able to accessible from /run/user/502/buildkit/buildkitd.

Installation

$ go install github.com/developer-guy/buildkit-machine@latest

Usage

Please ensure you've installed limactl because buildkit-machine will use limactl executable under the hood.

To make it accessible Buildkitd Daemon over socket:

$ buildkit-machine start buildkitd --unix $(pwd)/buildkitd.sock

To make it accessible Buildkitd Daemon over TCP connection:

$ buildkit-machine start builtkitd --tcp 9999

Once you make buildkitd accessible to your host, you can be able to use client tooling such as buildctl to start building and pushing container images. There is an on-going issue in Docker Buildx side to let Buildx to connect remote Buildkit daemon. Once it is ready, we can use buildx too.

Owner
Batuhan Apaydın
I do mostly #Go, #Kubernetes, and cloud-native stuff 🐱 🐳 ⛵️ Organizer at @goturkiye_ & Community Rel. at @devopstr 🧑🏻‍💻✍️
Batuhan Apaydın
Comments
  • fix: minor nit

    fix: minor nit

    I send multiple small commits in single PR, I hope that is OK.

    The biggest change is the dependencies (go.mod and go.sum files), that is because I removed the blank imports which removed the dependency to lima module and I also updated dependencies to the latest versions.

  • Stop lima VM instead of deleting it?

    Stop lima VM instead of deleting it?

    Hi,

    When stopping the buildkit-machine the lima VM is deleted:

    https://github.com/developer-guy/buildkit-machine/blob/6863e065d17f1b7f45bd0d746ca6c4a064a576c0/cmd/start.go#L170

    This means that the next time that I run buildkit-machine start, the lima VM needs to be created from scratch. I wonder if it'd make more sense to just stop it instead?

  • build(deps): Bump github.com/containerd/containerd from 1.5.8 to 1.5.9

    build(deps): Bump github.com/containerd/containerd from 1.5.8 to 1.5.9

    Bumps github.com/containerd/containerd from 1.5.8 to 1.5.9.

    Release notes

    Sourced from github.com/containerd/containerd's releases.

    containerd 1.5.9

    Welcome to the v1.5.9 release of containerd!

    The ninth patch release for containerd 1.5 is a security release to fix CVE-2021-43816.

    Notable Updates

    • Fix unprivileged pod using 'hostPath' bypassing SELinux labels (GHSA-mvff-h3cj-wj9c)
    • Fix setting the "container_kvm_t" SELinux label (#6381)

    See the changelog for complete list of changes

    Please try out the release binaries and report any issues at https://github.com/containerd/containerd/issues.

    Contributors

    • Derek McGowan
    • Sebastiaan van Stijn
    • Michael Crosby
    • Phil Estes
    • Akihiro Suda
    • Fabiano Fidêncio
    • Samuel Karp
    • Wei Fu

    Changes

    • Github Security Advisory GHSA-mvff-h3cj-wj9c
      • e4b62aaa5 Prepare release notes for v1.5.9
      • a41213fed only relabel cri managed host mounts
    • [release/1.5] seutil: Fix setting the "container_kvm_t" label (#6381)
      • da5749b67 seutil: Fix setting the "container_kvm_t" label
    • [release/1.5] Update Go to 1.16.12 (#6367)
      • 8c24a6199 [release/1.5] Update Go to 1.16.12
    • [release/1.5] go.mod github.com/opencontainers/image-spec v1.0.2 (#6264)
      • 7ab52528b [release/1.5] go.mod github.com/opencontainers/image-spec v1.0.2
    • [release/1.5] update runc binary to v1.0.3 (#6343)
    • [release/1.5] Update Go to 1.16.11 (#6334)
      • 3ff8be2d9 [release/1.5] Update Go to 1.16.11

    Dependency Changes

    • github.com/opencontainers/image-spec v1.0.1 -> v1.0.2

    Previous release can be found at v1.5.8

    Commits
    • 1407cab Merge pull request from GHSA-mvff-h3cj-wj9c
    • e4b62aa Prepare release notes for v1.5.9
    • 167c3e0 Merge pull request #6381 from fidencio/wip/backport-seutil-fix-container_kvm_...
    • da5749b seutil: Fix setting the "container_kvm_t" label
    • 63c9773 Merge pull request #6367 from thaJeztah/1.5_bump_go_1.16.12
    • 8c24a61 [release/1.5] Update Go to 1.16.12
    • e7d4349 Merge pull request #6264 from thaJeztah/1.5_bump_oci_spec
    • 7ab5252 [release/1.5] go.mod github.com/opencontainers/image-spec v1.0.2
    • a41213f only relabel cri managed host mounts
    • f1c26fe Merge pull request #6343 from AkihiroSuda/runc-1.0.3-15
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Hardcoded 502 in the command

    Hardcoded 502 in the command

    See: https://github.com/developer-guy/buildkit-machine/blob/28af91072d1c958e8196633083953255e08db628/cmd/start.go#L131

    Had better to get from the lime by issuing: id -u

  • register buildkitd as remote builder to buildx automatically

    register buildkitd as remote builder to buildx automatically

    A new driver has been added to the buildx^1 named remote. You can take a look at the documentation of this driver here. The idea is simple, just registry buildkitd created by buildkit-machine as a remote driver to Buildx automatically.

Kubernetes Reboot Daemon
Kubernetes Reboot Daemon

kured - Kubernetes Reboot Daemon Introduction Kubernetes & OS Compatibility Installation Configuration Reboot Sentinel File & Period Setting a schedul

Jan 3, 2023
Bastionzeros Agent and Daemon!

Bzero Bastionzero Bastionzero is a simple to use zero trust access SaaS for dynamic cloud environments. Bastionzero is the most secure way to lock dow

Oct 12, 2022
This is a POC for a Falco Plugin allowing to gather events from a locale docker daemon.

Docker Events Plugin This is a POC for a Falco Plugin allowing to gather events from a locale docker daemon. ⚠️ This is a POC, don't use in Production

Apr 15, 2022
nerdctl daemon (Docker API)
nerdctl daemon (Docker API)

nerdctld This is a daemon offering a nerdctl.sock endpoint. It can be used with DOCKER_HOST=unix://nerdctl.sock. Normally the nerdctl tool is a CLI-on

Dec 15, 2022
CetusGuard is a tool that allows to protect the Docker daemon socket by filtering the calls to its API endpoints.

CetusGuard CetusGuard is a tool that allows to protect the Docker daemon socket by filtering the calls to its API endpoints. Some highlights: It is wr

Dec 23, 2022
🗑️ Cleanup script for macOS

MacCleanup A cleanup script for macOS that cleans up your system. Features By default it performs the following tasks: Empty the Trash on All Mounted

Mar 29, 2022
A docker image and a launcher to run sasm on Windows and MacOS
A docker image and a launcher to run sasm on Windows and MacOS

Sasm-docker Sasm-docker simplifies the setup and use of SASM by running it inside a docker container and using x11 (X Window System) in order to displ

Nov 14, 2022
macOS Unlocker V4.0 for VMware Workstation

macOS Unlocker V4.0 for VMware Workstation IMPORTANT Use a release from the Releases section of this GitHub repository. https://github.com/DrDonk/golo

Dec 29, 2022
The DGL Operator makes it easy to run Deep Graph Library (DGL) graph neural network training on Kubernetes

DGL Operator The DGL Operator makes it easy to run Deep Graph Library (DGL) graph neural network distributed or non-distributed training on Kubernetes

Dec 19, 2022
The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Sep 27, 2022
Kusk makes your OpenAPI definition the source of truth for API resources in your cluster
Kusk makes your OpenAPI definition the source of truth for API resources in your cluster

Kusk - use OpenAPI to configure Kubernetes What is Kusk? Developers deploying their REST APIs in Kubernetes shouldn't have to worry about managing res

Dec 16, 2022
moreHandlers is a library which makes possible the use of multiple handlers for the MCBE server software

moreHandlers moreHandlers is a library which makes possible the use of multiple handlers for the MCBE server software https://github.com/df-mc/dragonf

Aug 4, 2022
GoBinClassify - A library that makes it easy to classify into groups

GoBinClassify GoBinClassify is a library that makes it easy to classify into gro

Feb 12, 2022
LTF is a minimal, transparent Terraform wrapper. It makes Terraform projects easier to work with.

LTF Status: alpha LTF is a minimal, transparent Terraform wrapper. It makes Terraform projects easier to work with. In standard Terraform projects, th

Nov 19, 2022
The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes.
The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes.

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes. Apache NiFI is a free, open-source solution that support powerful and scalable directed graphs of data routing, transformation, and system mediation logic.

Dec 26, 2022
A Go script that makes your GitHub contribution activity panel look awesome! Display a message !
A Go script that makes your GitHub contribution activity panel look awesome! Display a message !

GitHub contributions generator A script written in Go, which goal is to make your GitHub contributions graph the way you want it to be. The goal of th

Jan 6, 2023
Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

The Moby Project Moby is an open-source project created by Docker to enable and accelerate software containerization. It provides a "Lego set" of tool

Jan 8, 2023
A simple project (which is visitor counter) on kubernetesA simple project (which is visitor counter) on kubernetes

k8s playground This project aims to deploy a simple project (which is visitor counter) on kubernetes. Deploy steps kubectl apply -f secret.yaml kubect

Dec 16, 2022