Docs: How builds work | Maritime

How builds work

a build turns your repo or ZIP into the container image your agent runs. This page covers what happens between maritime deploy and a running agent. Applies to repo and ZIP deploys; template agents skip the build entirely (they are one image pull from live).

The pipeline

Repo and ZIP deploys build on a dedicated build machine, never on the host that runs your agent. BuildKit clones the repo at your chosen branch, builds the Dockerfile at the repo root, and ships the finished image to your agent's host through a private registry. A typical build plus ship lands in 1 to 3 minutes; if the builder was idle it cold-starts first, which adds about a minute.

Watching a build

The agent page streams the build log live under Overview → Builds. From the CLI:

maritime deploy my-brain --source github --repo https://github.com/acme/my-brain --wait

maritime history my-brain                                      # every attempt with its outcome
maritime history my-brain --json | jq -r '.[0].buildLog'       # full build log of the latest attempt

When builds fail

Builds fail loudly: the deployment is marked failed with the tail of the build output, and the agent stays in error until the next successful deploy. A build that prints nothing for 5 minutes is killed. Failed builds are not retried automatically (transient infrastructure errors are, up to three times); fix the Dockerfile and redeploy.