ContainerCreateRequest

@Serializable
data class ContainerCreateRequest(val hostname: String? = null, val domainname: String? = null, val user: String? = null, val attachStdin: Boolean? = false, val attachStdout: Boolean? = true, val attachStderr: Boolean? = true, val exposedPorts: Map<String, JsonObject>? = null, val tty: Boolean? = false, val openStdin: Boolean? = false, val stdinOnce: Boolean? = false, val env: List<String>? = null, val cmd: List<String>? = null, val healthcheck: HealthConfig? = null, val argsEscaped: Boolean? = false, val image: String? = null, val volumes: Map<String, JsonObject>? = null, val workingDir: String? = null, val entrypoint: List<String>? = null, val networkDisabled: Boolean? = null, val macAddress: String? = null, val onBuild: List<String>? = null, val labels: Map<String, String>? = null, val stopSignal: String? = null, val stopTimeout: Int? = null, val shell: List<String>? = null, val hostConfig: HostConfig? = null, val 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

Constructors

Link copied to clipboard
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)

Properties

Link copied to clipboard
@SerialName(value = "ArgsEscaped")
val argsEscaped: Boolean?
Link copied to clipboard
@SerialName(value = "AttachStderr")
val attachStderr: Boolean?
Link copied to clipboard
@SerialName(value = "AttachStdin")
val attachStdin: Boolean?
Link copied to clipboard
@SerialName(value = "AttachStdout")
val attachStdout: Boolean?
Link copied to clipboard
@SerialName(value = "Cmd")
val cmd: List<String>?
Link copied to clipboard
@SerialName(value = "Domainname")
val domainname: String?
Link copied to clipboard
@SerialName(value = "Entrypoint")
val entrypoint: List<String>?
Link copied to clipboard
@SerialName(value = "Env")
val env: List<String>?
Link copied to clipboard
@SerialName(value = "ExposedPorts")
val exposedPorts: Map<String, JsonObject>?
Link copied to clipboard
@SerialName(value = "Healthcheck")
val healthcheck: HealthConfig?
Link copied to clipboard
@SerialName(value = "HostConfig")
val hostConfig: HostConfig?
Link copied to clipboard
@SerialName(value = "Hostname")
val hostname: String?
Link copied to clipboard
@SerialName(value = "Image")
val image: String?
Link copied to clipboard
@SerialName(value = "Labels")
val labels: Map<String, String>?
Link copied to clipboard
@SerialName(value = "MacAddress")
val macAddress: String?
Link copied to clipboard
@SerialName(value = "NetworkDisabled")
val networkDisabled: Boolean?
Link copied to clipboard
@SerialName(value = "NetworkingConfig")
val networkingConfig: NetworkingConfig?
Link copied to clipboard
@SerialName(value = "OnBuild")
val onBuild: List<String>?
Link copied to clipboard
@SerialName(value = "OpenStdin")
val openStdin: Boolean?
Link copied to clipboard
@SerialName(value = "Shell")
val shell: List<String>?
Link copied to clipboard
@SerialName(value = "StdinOnce")
val stdinOnce: Boolean?
Link copied to clipboard
@SerialName(value = "StopSignal")
val stopSignal: String?
Link copied to clipboard
@SerialName(value = "StopTimeout")
val stopTimeout: Int?
Link copied to clipboard
@SerialName(value = "Tty")
val tty: Boolean?
Link copied to clipboard
@SerialName(value = "User")
val user: String?
Link copied to clipboard
@SerialName(value = "Volumes")
val volumes: Map<String, JsonObject>?
Link copied to clipboard
@SerialName(value = "WorkingDir")
val workingDir: String?