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

# Docker runtime

export const runtime_0 = "docker"

In Coral, (Docker) containers are the preferred production execution environment for Coral agents. The Docker runtime is
a way of configuring the Coral server to run your agent using a Docker image.

Running Docker agents on your Coral server may require additional configuration, see [the Docker config](/reference/server/config/docker) for more information.

<Info>
  If you are running the Coral server using Docker, you must set up [Docker in Docker](/guides/production/docker-in-docker)
</Info>

# Full example

```toml theme={null}
[runtimes.docker]
image = "myusername/myagent"
command = ["--custom-command", "123"]
transport = "streamable_http" # default value
```

# Environment

### Standard streams

<Info>Timestamps and log levels are prefixed by the Coral server, the agent should not print these.</Info>

* Standard output will be printed to the agent’s log at an INFO level.
* Standard error will be printed to the agent's log at a WARN level.
* Standard input is not used

### Coral environment variables

#### `CORAL_CONNECTION_URL`

The URL of the MCP server that this agent must connect to, either SSE or Streamable HTTP depending on the value given
for [runtimes.{runtime_0}.transport](#transport).

This URL will change every time the agent is launched. This URL contains the
[agent secret](#coral_agent_secret) and should not be printed or shared.

The value of this should also not be given to an LLM.

#### `CORAL_RUNTIME_ID`

Always set to <code>{runtime_0}</code>.

#### `CORAL_AGENT_ID`

The unique name provided for this agent in [GraphAgentRequest.name](/api-reference/models/GraphAgentRequest#name).

#### `CORAL_AGENT_SECRET`

A unique secret generated for this agent. This secret is used to authenticate communications between the agent and the
Coral server. This secret should not be printed, shared or given to an LLM.

#### `CORAL_SESSION_ID`

The unique ID of the session that this agent belongs to. This ID is generated by the Coral server and is used uniquely
to identify a session. This ID should not be printed, shared or given to an LLM.

#### `CORAL_API_URL`

The base URL of the Coral server. This can be used to RPC requests to the Coral server on behalf of the agent. All
requests to the Coral server must be authenticated with the [agent secret](#coral_agent_secret).

### Optional Coral environment variables

#### `CORAL_PROMPT_SYSTEM`

If the session that launched this agent defines a [systemPrompt](/api-reference/models/GraphAgentRequest#schema-system-prompt), it will be set to this environment variable. If not, this variable will not be set.

#### `CORAL_REMOTE_AGENT`

Placeholder. Currently not used.

### Other environment variables

* An environment variable for every defined [agent option](/reference/agent/options)
* All the environment variables the Coral server was launched with
* All environment variables configured in the Coral server's [debug.additionalDockerEnvironment](/reference/server/config/debug#additional-docker-environment) configuration field

# Configuration

### runtimes.docker.image

<Badge color="red">required</Badge>

**Example**

```toml theme={null}
[runtimes.docker]
image = "myusername/myagent"
```

A [string](https://toml.io/en/v1.1.0#string) representing the Docker image name to run for this agent. If no tag is
specified, the [version of the agent](/reference/agent/tables/agent#agent-version) will be used as a tag. It is
recommended to **not** specify a tag in this field and allow the agent version to control which Docker image is used.

### runtimes.docker.command

<Badge color="blue">optional</Badge>

**Example**

```toml theme={null}
[runtimes.docker]
command = ["--custom-command", "123"]
```

An [array](https://toml.io/en/v1.1.0#array) of [strings](https://toml.io/en/v1.1.0#string) overriding the default
command ran in the Docker container. Leave this field empty to use the command specified in the Docker image.

<h3 id="transport">
  runtimes.docker.transport
</h3>

<Badge color="blue">default </Badge> `streamable_http` <br />
<Badge color="blue">optional</Badge>

**Example**

```toml theme={null}
[runtimes.docker]
transport = "sse"
```

<Warning>
  `sse` is deprecated and may be removed in a future release.
</Warning>

A [string](https://toml.io/en/v1.1.0#string) controlling the value of the [CORAL\_CONNECTION\_URL](#coral_connection_url) Coral environment
variable. If your agent requires a specific MCP transport protocol, it must be set here.

Supported values:

* `sse`
* `streamable_http`
