---
name: corail
description: Install corail and run a reef.json atoll with coraild and recify. Use when asked to run containers with corail, write or apply a reef.json, or check an atoll's status.
---

# corail

Read /instructions.txt first for the vocabulary and the rules a reef.json must follow.

## Install

1. Check for the binaries: `command -v corail coraild recify sonar`.
2. If missing on Linux: `curl -fsS https://www.coraild.com/install | bash`. Or build from source with Zig 0.16: `just build`, then add `zig-out/bin` to `PATH`.
3. Verify: `corail run --rm alpine -- echo hi` prints `hi`.
4. If it prints `corail: cannot create a usable user namespace (EPERM).` on Ubuntu 23.10+, run `just install-apparmor` once (needs sudo), or follow the numbered options in that message. Do not run corail as root to get around it.

## Apply an atoll

1. Write `reef.json` (see /docs/atoll for every field). Smallest useful file:
   `{"name":"web","capsules":[{"name":"app","image":"alpine:latest","cmd":["sleep","300"]}]}`
2. Start the daemon if `recify status` fails: `coraild &`.
3. `recify apply -f reef.json` prints `atoll/<name> applied`.
4. Poll `recify get atolls` until READY equals the capsule count and STATUS is `Running`.
5. If it does not settle: `recify describe atoll <name>` shows per-capsule state and events; `recify logs <name> [capsule]` shows output.

## Clean up

`recify delete atoll <name>`. Stop the daemon you started.

## Do not

- Do not use `--net bridge` or `-p`; they need root.
- Do not invent flags. The exact text is at /docs/usage.
