> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sailresearch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Harbor tasks on Sail

> Point Harbor's environment loader at Sailboxes with one import path

Harbor is a harness for running agent tasks in isolated environments. Sail
ships a Harbor environment implementation, so a Harbor task can run its
commands on a Sailbox instead of a local container. Nothing in Harbor needs
to change: Harbor loads environment implementations by import path, and
Sail's is

```text theme={null}
sail.harbor:SailboxEnvironment
```

Give that import path to Harbor wherever it accepts an environment
implementation, with the `sail` package installed in the same Python
environment as Harbor.

## Setup

Set `SAIL_API_KEY` (or run `sail auth login` once) in the process that runs
Harbor. Each environment's Sailbox is created in your organization's
`harbor` [app](/sailbox-sdk-apps), the group that holds related
Sailboxes, which is created on first use; set `SAIL_APP` to use a different
app.

## Task images

A task that declares a prebuilt `docker_image` runs on that image, pulled
from its registry. Docker-style short references work: `python:3.11` means
`docker.io/library/python:3.11`. The registry must be one the image API
supports (`docker.io`, `ghcr.io`, `public.ecr.aws`, or `quay.io`), and the
image must be Debian or Ubuntu based; see
[registry images](/sailboxes-images#bring-your-own-base-image) for the full
requirements.

A task that ships a Dockerfile instead has it built into a Sailbox image.
The first run of such a task in your organization waits for the build; see
[Build from a Dockerfile](/sailboxes-images#build-from-a-dockerfile) for
what Dockerfiles can contain.

A task that ships an `environment/docker-compose.yaml` runs as a Docker
Compose project, and the Sailbox provides the Docker host: the services'
images are pulled or built inside it, commands run in the task's `main`
service, and Harbor's per-service operations (exec, download, stop) reach
the other services. Stopping such an environment without deleting it puts
the whole project to sleep with the Sailbox, and the next start resumes
it intact.

## Lifecycle

Starting an environment creates its Sailbox and waits until it is running,
which can take a few minutes when the image still has to build or the
Sailbox queues for capacity. Stopping an environment puts its Sailbox to
sleep: billing stops, its filesystem and running processes are kept, and
starting the same environment again in the same run resumes it. When Harbor
deletes an environment, its Sailbox is terminated permanently.

## Limits

A task's CPU, memory, and storage requests select a Sailbox size; a task
requesting more than 8 CPUs fails up front, since no Sailbox provides more.

Sailboxes do not provide GPUs, TPUs, or Windows containers, and they do
not enforce a task's restrictive network policies (the no-network mode, or
an egress allowlist); a task with the default public networking is
unaffected. A task that asks for one of these fails up front with a clear
error instead of running without it. Outside Compose mode, host mount
specs are accepted and unused, the same as Harbor's other cloud providers;
a Compose task's mounts are bound into its `main` service.
