main. Other containers provide the services it needs. All belong to one trial.
Add a small HTTP service
This environment gives the agent a JSON file through an HTTP service. Add it to a task with an instruction and verifier.my-task
instruction.md
task.toml
environment
Dockerfile
docker-compose.yaml
api
Dockerfile
status.json
tests
test.sh
public; Compose does not support no-network. Update the existing [environment] table if present:
task.toml
environment/docker-compose.yaml:
environment/docker-compose.yaml
main from environment/Dockerfile and api from its own Dockerfile. depends_on waits for the API healthcheck. From main, the agent can read http://api:8000/status.json using the service name as the hostname.
The main stanza above only adds a dependency. You can omit it when you have no overrides. To use a prebuilt main image, set [environment].docker_image in task.toml.
Images, files, and configuration
Images are resolved during dataset import. Runtime tasks use the recorded images. Task files and image-build inputs are not a secret store; use job secrets for agent credentials.
Compose variable interpolation
Compose variable interpolation
At runtime, Evolve supplies Harbor’s Compose variables over your
[environment.env] literals:-
${CONTEXT_DIR},${MAIN_IMAGE_NAME}, and${PREBUILT_IMAGE_NAME} -
${CPUS}and${MEMORY} -
HOST_andENV_paths forAGENT_LOGS,VERIFIER_LOGS, andARTIFACTS
main.image, and main.working_dir. Here ${CONTEXT_DIR} is the task’s environment/ directory. Other values come from [environment.env] literals, then :- or - defaults.Configuration that import rejects
Configuration that import rejects
-
includeand serviceextends, which can introduce unseen service images. -
Interpolated sidecar image names, untagged images, and an unpinned
:latesttag. Onmain,${MAIN_IMAGE_NAME}and${PREBUILT_IMAGE_NAME}name main’s own image, and other variables are accepted when they resolve at import. -
A variable with no value and no default in a build context or in main’s
working_dir, and aworking_dirthat is not an absolute path. -
Build options such as
ssh,secrets, additional contexts, and inline Dockerfiles. - A build context outside the task, or a Dockerfile outside its build context.
-
main.buildtogether with[environment].docker_image, or conflicting main image declarations.
Provider and task limits
Compose tasks run on E2B or Daytona. They do not support Modal,no-network, GPUs, or multi-step execution. Sandbox capabilities describes provider selection and other network restrictions.
Score service state
A verifier may need more than files frommain: a request log, a database export, or an in-memory counter. Use collection hooks and service artifacts to save that evidence before verification.
