ContainerCreateRequest

constructor(hostname: String? = null, domainname: String? = null, user: String? = null, attachStdin: Boolean? = false, attachStdout: Boolean? = true, attachStderr: Boolean? = true, exposedPorts: Map<String, JsonObject>? = null, tty: Boolean? = false, openStdin: Boolean? = false, stdinOnce: Boolean? = false, env: List<String>? = null, cmd: List<String>? = null, healthcheck: HealthConfig? = null, argsEscaped: Boolean? = false, image: String? = null, volumes: Map<String, JsonObject>? = null, workingDir: String? = null, entrypoint: List<String>? = null, networkDisabled: Boolean? = null, macAddress: String? = null, onBuild: List<String>? = null, labels: Map<String, String>? = null, stopSignal: String? = null, stopTimeout: Int? = null, shell: List<String>? = null, hostConfig: HostConfig? = null, networkingConfig: NetworkingConfig? = null)

Parameters

hostname

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

domainname

The domain name to use for the container.

user

Commands run as this user inside the container. If omitted, commands run as the user specified in the image the container was started from. Can be either user-name or UID, and optional group-name or GID, separated by a colon (<user-name|UID>[<:group-name|GID>]).

attachStdin

Whether to attach to stdin.

attachStdout

Whether to attach to stdout.

attachStderr

Whether to attach to stderr.

exposedPorts

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

tty

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

openStdin

Open stdin

stdinOnce

Close stdin after one attached client disconnects

env

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.

cmd

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

healthcheck
argsEscaped

Command is already escaped (Windows only)

image

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

volumes

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

workingDir

The working directory for commands to run in.

entrypoint

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

networkDisabled

Disable networking for the container.

macAddress

MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead.

onBuild

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

labels

User-defined key/value metadata.

stopSignal

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

stopTimeout

Timeout to stop a container in seconds.

shell

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

hostConfig
networkingConfig