Skip to main content

Create a container

POST 

/node/:hostname/container/docker

Create a new container on the target node. Returns a job ID for tracking the asynchronous operation.

Request

Path Parameters

    hostname stringrequired

    Possible values: non-empty

    Target agent hostname, reserved routing value (_any, _all), or label selector (key:value).

Body

required

Container creation parameters.

    image stringrequired

    Container image reference (e.g., "nginx:latest").

    name string

    Optional name for the container.

    command string[]

    Command to run in the container.

    env string[]

    Environment variables in KEY=VALUE format.

    ports string[]

    Port mappings in host_port:container_port format.

    volumes string[]

    Volume mounts in host_path:container_path format.

    auto_start boolean

    Default value: true

    Whether to start the container immediately after creation. Defaults to true.

Responses

Container creation accepted.

Schema

    job_id uuid

    The job ID used to process this request.

    results

    object[]

    required

  • Array [

  • hostname stringrequired

    The hostname of the agent.

    id string

    Container identifier.

    name string

    Container name.

    image string

    Image used by the container.

    state string

    Current container state.

    created string

    Container creation timestamp.

    changed boolean

    Whether the operation modified system state.

    error string

    Error message if the agent failed.

  • ]

Loading...