Skip to main content

Interface: ContainerCreateOptions

Defined in: packages/extension-api/src/extension-api.d.ts:3162

Properties

ArgsEscaped?

optional ArgsEscaped: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:3293

Default: false

Command is already escaped (Windows only)


AttachStderr?

optional AttachStderr: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:3261

Whether to attach to stderr (default false)


AttachStdin?

optional AttachStdin: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:3251

Whether to attach to stdin (default false)


AttachStdout?

optional AttachStdout: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:3256

Whether to attach to stdout(default false)


Cmd?

optional Cmd: string[]

Defined in: packages/extension-api/src/extension-api.d.ts:3239

Command to run specified as an array of strings


Detach?

optional Detach: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:3276

Run the container in the background


Domainname?

optional Domainname: string

Defined in: packages/extension-api/src/extension-api.d.ts:3193

The domain name to use for the container.


Entrypoint?

optional Entrypoint: string | string[]

Defined in: packages/extension-api/src/extension-api.d.ts:3246

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 Containerfile).


Env?

optional Env: string[]

Defined in: packages/extension-api/src/extension-api.d.ts:3203

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


EnvFiles?

optional EnvFiles: string[]

Defined in: packages/extension-api/src/extension-api.d.ts:3208

Environment files to use


ExposedPorts?

optional ExposedPorts: object

Defined in: packages/extension-api/src/extension-api.d.ts:3219

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

Index Signature

[port: string]: object


HealthCheck?

optional HealthCheck: HealthConfig

Defined in: packages/extension-api/src/extension-api.d.ts:3286

A test to perform to check that the container is healthy. See HealthConfig for usage details


HostConfig?

optional HostConfig: HostConfig

Defined in: packages/extension-api/src/extension-api.d.ts:3224

Container configuration that depends on the host we are running on


Hostname?

optional Hostname: string

Defined in: packages/extension-api/src/extension-api.d.ts:3188

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


Image?

optional Image: string

Defined in: packages/extension-api/src/extension-api.d.ts:3229

The name (or reference) of the image to use when creating the container


Labels?

optional Labels: object

Defined in: packages/extension-api/src/extension-api.d.ts:3213

User-defined key/value metadata

Index Signature

[label: string]: string


MacAddress?

optional MacAddress: string

Defined in: packages/extension-api/src/extension-api.d.ts:3313

MAC address of the container.


name?

optional name: string

Defined in: packages/extension-api/src/extension-api.d.ts:3166

Assign the specified name to the container. Must match the regular expression/?[a-zA-Z0-9][a-zA-Z0-9_.-]+. If not speficied, the platform assigns a unique name to the container


NetworkConfig?

optional NetworkConfig: NetworkingConfig

Defined in: packages/extension-api/src/extension-api.d.ts:3337


NetworkDisabled?

optional NetworkDisabled: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:3308

Disable networking for the container.


OnBuild?

optional OnBuild: string[]

Defined in: packages/extension-api/src/extension-api.d.ts:3318

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


OpenStdin?

optional OpenStdin: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:3266

Whether to open stdin (default false)


platform?

optional platform: string

Defined in: packages/extension-api/src/extension-api.d.ts:3183

Default: ""

Platform in the format os[/arch[/variant]] used for image lookup.

When specified, the daemon checks if the requested image is present in the local image cache with the given OS and Architecture, and otherwise returns a 404 status.

If the option is not set, the host's native OS and Architecture are used to look up the image in the image cache. However, if no platform is passed and the given image does exist in the local image cache, but its OS or architecture does not match, the container is created with the available image, and a warning is added to the Warnings field in the response, for example;

WARNING: The requested image's platform (linux/arm64/v8) does not
match the detected host platform (linux/amd64) and no
specific platform was requested

pod?

optional pod: string

Defined in: packages/extension-api/src/extension-api.d.ts:3342

Pod where to create the container in


Shell?

optional Shell: string[]

Defined in: packages/extension-api/src/extension-api.d.ts:3335

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


start?

optional start: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:3281

Start the container immediately (default true)


StdinOnce?

optional StdinOnce: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:3271

Close stdin after one attached client disconnects (deafult false)


StopSignal?

optional StopSignal: string

Defined in: packages/extension-api/src/extension-api.d.ts:3323

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


StopTimeout?

optional StopTimeout: number

Defined in: packages/extension-api/src/extension-api.d.ts:3330

Default: 10

Timeout to stop a container in seconds.


Tty?

optional Tty: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:3234

Attach standard streams to a TTY, including stdin if it is not closed (default false)


User?

optional User: string

Defined in: packages/extension-api/src/extension-api.d.ts:3198

The user that commands are run as inside the container


Volumes?

optional Volumes: object

Defined in: packages/extension-api/src/extension-api.d.ts:3298

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

Index Signature

[volume: string]: object


WorkingDir?

optional WorkingDir: string

Defined in: packages/extension-api/src/extension-api.d.ts:3303

The working directory for commands to run in.