# 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/noble/release-20250313/ubuntu-24.04-server-cloudimg-amd64.img"
  arch: "x86_64"
  digest: "sha256:eacac65efe9e9bae0cbcb3f9d5c2b5e8c5313fa78a3bc401c3fb28b2d48cefc0"
- location: "https://cloud-images.ubuntu.com/releases/noble/release-20250313/ubuntu-24.04-server-cloudimg-arm64.img"
  arch: "aarch64"
  digest: "sha256:103f31c5a5b7f031a60ce3555c8fbd56317fd8ffbaaa7e17002879e6157d546d"
# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache
- location: "https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img"
  arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/releases/noble/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"
