# A template to use BuildKit
# $ limactl start ./buildkit.yaml

# To run `buildkit` on the host (assumes buildctl is installed):
# $ export BUILDKIT_HOST=$(limactl list buildkit --format 'unix://{{.Dir}}/sock/buildkitd.sock')
# $ buildctl debug workers
message: |
  To run `buildkit` on the host (assumes buildctl is installed), run the following commands:
  -------
  export BUILDKIT_HOST="unix://{{.Dir}}/sock/buildkitd.sock"
  buildctl debug workers
  -------
images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20241119/ubuntu-24.04-server-cloudimg-amd64.img"
  arch: "x86_64"
  digest: "sha256:b63f266fa4bdf146dea5b0938fceac694cb3393688fb12a048ba2fc72e7bfe1b"
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20241119/ubuntu-24.04-server-cloudimg-arm64.img"
  arch: "aarch64"
  digest: "sha256:6e1f90d3e81b90202b46c3573590867e575e504af2c63dd5c9b529f174e3d793"
# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img"
  arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img"
  arch: "aarch64"

containerd:
  system: false
  user: true

portForwards:
- guestSocket: "/run/user/{{.UID}}/buildkit-default/buildkitd.sock"
  hostSocket: "{{.Dir}}/sock/buildkitd.sock"
