Interface ContainerCreateRequest

ContainerCreateRequest

interface ContainerCreateRequest {
    ArgsEscaped?: null | boolean;
    AttachStderr?: boolean;
    AttachStdin?: boolean;
    AttachStdout?: boolean;
    Cmd?: string[];
    Domainname?: string;
    Entrypoint?: string[];
    Env?: string[];
    ExposedPorts?: null | {
        [key: string]: object;
    };
    Healthcheck?: HealthConfig;
    HostConfig?: HostConfig;
    Hostname?: string;
    Image?: string;
    Labels?: {
        [key: string]: string;
    };
    MacAddress?: null | string;
    NetworkDisabled?: null | boolean;
    NetworkingConfig?: NetworkingConfig;
    OnBuild?: null | string[];
    OpenStdin?: boolean;
    Shell?: null | string[];
    StdinOnce?: boolean;
    StopSignal?: null | string;
    StopTimeout?: null | number;
    Tty?: boolean;
    User?: string;
    Volumes?: {
        [key: string]: object;
    };
    WorkingDir?: string;
}

Properties

ArgsEscaped?: null | boolean

Command is already escaped (Windows only)

AttachStderr?: boolean

Whether to attach to stderr.

AttachStdin?: boolean

Whether to attach to stdin.

AttachStdout?: boolean

Whether to attach to stdout.

Cmd?: string[]

Command to run specified as a string or an array of strings.

Domainname?: string

The domain name to use for the container.

Entrypoint?: string[]

The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string ([\"\"]) then the entry point is reset to system default (i.e., the entry point used by docker when there is no ENTRYPOINT instruction in the Dockerfile).

Env?: string[]

A list of environment variables to set inside the container in the form [\"VAR=value\", ...]. A variable without = is removed from the environment, rather than to have an empty value.

ExposedPorts?: null | {
    [key: string]: object;
}

An object mapping ports to an empty object in the form: {\"<port>/<tcp|udp|sctp>\": {}}

Healthcheck?: HealthConfig
HostConfig?: HostConfig
Hostname?: string

The hostname to use for the container, as a valid RFC 1123 hostname.

Image?: string

The name (or reference) of the image to use when creating the container, or which was used when the container was created.

Labels?: {
    [key: string]: string;
}

User-defined key/value metadata.

MacAddress?: null | string

MAC address of the container.

NetworkDisabled?: null | boolean

Disable networking for the container.

NetworkingConfig?: NetworkingConfig
OnBuild?: null | string[]

ONBUILD metadata that were defined in the image's Dockerfile.

OpenStdin?: boolean

Open stdin

Shell?: null | string[]

Shell for when RUN, CMD, and ENTRYPOINT uses a shell.

StdinOnce?: boolean

Close stdin after one attached client disconnects

StopSignal?: null | string

Signal to stop a container as a string or unsigned integer.

StopTimeout?: null | number

Timeout to stop a container in seconds.

Tty?: boolean

Attach standard streams to a TTY, including stdin if it is not closed.

User?: string

The user that commands are run as inside the container.

Volumes?: {
    [key: string]: object;
}

An object mapping mount point paths inside the container to empty objects.

WorkingDir?: string

The working directory for commands to run in.