Combining both registries

Keep the macOS base template in the Anka Registry and each tool as an OCI tag in an OCI registry

You can use the Anka Registry and an OCI registry together:

  • The Anka Registry stores the macOS base template as a full tag. The Build Cloud Controller can use it.
  • The OCI registry stores each tool as a small OCI tag. You can pull the same tool tag onto templates for other macOS versions.

Rules

  • Pull the Anka Registry tag first. Then pull the OCI tags. A pull of an Anka Registry tag removes the OCI tags that you pulled before it.
  • push_mode and --thin apply only to the pushes to the OCI registry. A push to the Anka Registry always stores the full tag.
  • The Anka Registry does not store OCI tags.

For all differences, see Anka Registry tags and OCI tags.

Example

Push the macOS base tag to the Anka Registry

Create a new VM. anka create installs macOS only. This push uploads the macOS disk as a full tag to the Anka Registry in ANKA_REGISTRY. The Anka Registry always stores the full tag, so push_mode does not apply.

❯ anka create 27.0.1 27.0.1
❯ anka push 27.0.1 -t vanilla http://anka.registry:8089

http://anka.registry:8089 is the Anka Registry. An OCI registry URL has a /v2/ path. This push creates template 27.0.1 and tag vanilla on the Anka Registry. A new 27.0.1 VM reports about 29.82GiB uploaded to tag vanilla. Pull this tag when a host needs the macOS disk:

❯ anka pull 27.0.1 -t vanilla http://anka.registry:8089

Push the tool tags to the OCI registry

Set push_mode to 2 before you push the tool tags.

❯ anka config push_mode 2
ANKA_PUSH_MODE sets the mode for one command. Use it when a change to anka config is a problem. Example: ANKA_PUSH_MODE=2 anka push 27.0.1 -t xcode-27.1 oci://registry.example.com/v2/

Install one tool, stop the VM, and push the next tag to the OCI registry. Leave the repository name off the URL. Anka uses the VM name.

❯ anka start 27.0.1
# install Xcode in the VM, then stop it
❯ anka stop 27.0.1
❯ anka push 27.0.1 -t xcode-27.1 oci://registry.example.com/v2/

The xcode-27.1 push uploads only the file changes since vanilla.

Install CMake and stop the VM.

❯ anka start 27.0.1
# install CMake in the VM, then stop it
❯ anka stop 27.0.1

The tag chain on this VM is now the vanilla tag, then the xcode-27.1 tag, then the CMake changes. You can push cmake without --thin or with --thin. Note that --thin works with push_mode 1 and with push_mode 2.

For the two forms of the cmake push, see Without --thin and With --thin.

Publish a template for Anka Build Cloud

The Build Cloud Controller cannot pull OCI tags. Build the template on a producer host instead:

  1. Pull the macOS base tag from the Anka Registry.
  2. Pull each OCI tag onto that VM, in order.
  3. Push the finished VM to the Anka Registry.

The Controller can then start VMs from that template, the same as from any other template. For the commands, see Preparing a build VM.