ContainerState constructor
- Input<
bool?> ? attach, - Input<
String?> ? bridge, - Input<
ContainerCapabilities?> ? capabilities, - Input<
String?> ? cgroupParent, - Input<
String?> ? cgroupnsMode, - Input<
List< ? command,String> ?> - Input<
String?> ? containerLogs, - Input<
int?> ? containerReadRefreshTimeoutMilliseconds, - Input<
int?> ? cpuPeriod, - Input<
int?> ? cpuQuota, - Input<
String?> ? cpuSet, - Input<
String?> ? cpus, - Input<
int?> ? destroyGraceSeconds, - Input<
List< ? deviceCgroupRules,String> ?> - Input<
List< ? deviceReadBps,ContainerDeviceReadBp> ?> - Input<
List< ? deviceReadIops,ContainerDeviceReadIop> ?> - Input<
List< ? deviceRequests,ContainerDeviceRequest> ?> - Input<
List< ? deviceWriteBps,ContainerDeviceWriteBp> ?> - Input<
List< ? deviceWriteIops,ContainerDeviceWriteIop> ?> - Input<
List< ? devices,ContainerDevice> ?> - Input<
List< ? dns,String> ?> - Input<
List< ? dnsOpts,String> ?> - Input<
List< ? dnsSearches,String> ?> - Input<
String?> ? domainname, - Input<
List< ? entrypoints,String> ?> - Input<
List< ? envs,String> ?> - Input<
int?> ? exitCode, - Input<
String?> ? gpus, - Input<
List< ? groupAdds,String> ?> - Input<
ContainerHealthcheck?> ? healthcheck, - Input<
String?> ? hostname, - Input<
List< ? hosts,ContainerHost> ?> - Input<
String?> ? image, - Input<
bool?> ? init, - Input<
String?> ? ipcMode, - Input<
List< ? labels,ContainerLabel> ?> - Input<
String?> ? logDriver, - Input<
Map< ? logOpts,String, String> ?> - Input<
bool?> ? logs, - Input<
int?> ? maxRetryCount, - Input<
int?> ? memory, - Input<
int?> ? memoryReservation, - Input<
int?> ? memorySwap, - Input<
List< ? mounts,ContainerMount> ?> - Input<
bool?> ? mustRun, - Input<
String?> ? name, - Input<
List< ? networkDatas,ContainerNetworkData> ?> - Input<
String?> ? networkMode, - Input<
List< ? networksAdvanced,ContainerNetworksAdvanced> ?> - Input<
String?> ? pidMode, - Input<
String?> ? platform, - Input<
List< ? ports,ContainerPort> ?> - Input<
bool?> ? privileged, - Input<
bool?> ? publishAllPorts, - Input<
bool?> ? readOnly, - Input<
bool?> ? removeVolumes, - Input<
String?> ? restart, - Input<
bool?> ? rm, - Input<
String?> ? runtime, - Input<
List< ? securityOpts,String> ?> - Input<
int?> ? shmSize, - Input<
bool?> ? start, - Input<
bool?> ? stdinOpen, - Input<
String?> ? stopSignal, - Input<
int?> ? stopTimeout, - Input<
Map< ? storageOpts,String, String> ?> - Input<
Map< ? sysctls,String, String> ?> - Input<
Map< ? tmpfs,String, String> ?> - Input<
bool?> ? tty, - Input<
List< ? ulimits,ContainerUlimit> ?> - Input<
List< ? uploads,ContainerUpload> ?> - Input<
String?> ? user, - Input<
String?> ? usernsMode, - Input<
List< ? volumes,ContainerVolume> ?> - Input<
bool?> ? wait, - Input<
int?> ? waitTimeout, - Input<
String?> ? workingDir,
Creates a new ContainerState.
attach If true attach to the container after its creation and waits the end of its execution. Defaults to false.
bridge The network bridge of the container as read from its NetworkSettings.
capabilities Add or drop certain linux capabilities.
cgroupParent Optional parent cgroup for the container
cgroupnsMode Cgroup namespace mode to use for the container. Possible values are: private, host.
command The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram","-f","baz.conf"].
containerLogs The logs of the container if its execution is done (attach must be disabled).
containerReadRefreshTimeoutMilliseconds The total number of milliseconds to wait for the container to reach status 'running'
cpuPeriod Specify the CPU CFS scheduler period (in microseconds), which is used alongside cpu-quota. Is ignored if cpus is set.
cpuQuota Impose a CPU CFS quota on the container (in microseconds). The number of microseconds per cpu-period that the container is limited to before throttled. Is ignored if cpus is set.
cpuSet A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.
cpuShares CPU shares (relative weight) for the container.
cpus Specify how much of the available CPU resources a container can use. e.g a value of 1.5 means the container is guaranteed at most one and a half of the CPUs. Has precedence over cpuPeriod and cpuQuota.
destroyGraceSeconds If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.
deviceCgroupRules Cgroup rules to allow access to classes of devices without binding specific device nodes.
deviceReadBps Limit read rate (bytes per second) from a device. This is the equivalent to repeating --device-read-bps for docker run.
deviceReadIops Limit read rate (IO per second) from a device. This is the equivalent to repeating --device-read-iops for docker run.
deviceRequests Device requests for the container, such as CDI devices (e.g., nvidia.com/gpu=all) or GPU requests. This is the equivalent to using the --device flag for CDI devices in docker run.
deviceWriteBps Limit write rate (bytes per second) to a device. This is the equivalent to repeating --device-write-bps for docker run.
deviceWriteIops Limit write rate (IO per second) to a device. This is the equivalent to repeating --device-write-iops for docker run.
devices Bind traditional devices to the container (e.g., /dev/nvidia0). For CDI devices, use deviceRequests instead.
dns DNS servers to use.
dnsOpts DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.
dnsSearches DNS search domains that are used when bare unqualified hostnames are used inside of the container.
domainname Domain name of the container.
entrypoints The command to use as the Entrypoint for the container. The Entrypoint allows you to configure a container to run as an executable. For example, to run /usr/bin/myprogram when starting a container, set the entrypoint to be "/usr/bin/myprogram"].
envs Environment variables to set in the form of KEY=VALUE, e.g. DEBUG=0
exitCode The exit code of the container if its execution is done (mustRun must be disabled).
gpus GPU devices to add to the container. Supported values are all or device=<id[,id...]>, for example device=0,2 or device=GPU-3a23c669-1f69-c64e-cf85-44e9b07e7a2a.
groupAdds Additional groups for the container user
healthcheck A test to perform to check that the container is healthy
hostname Hostname of the container.
hosts Additional hosts to add to the container.
image The ID of the image to back this container. The easiest way to get this value is to use the imageId attribute of the docker.RemoteImage resource as is shown in the example.
init Configured whether an init process should be injected for this container. If unset this will default to the dockerd defaults.
ipcMode IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.
labels User-defined key/value metadata
logDriver The logging driver to use for the container.
logOpts Key/value pairs to use as options for the logging driver.
logs Save the container logs (attach must be enabled). Defaults to false.
maxRetryCount The maximum amount of times to an attempt a restart when restart is set to 'on-failure'.
memory The memory limit for the container in MBs.
memoryReservation The memory-resveration for the container in MBs. Defaults to 0. Allows you to specify a soft limit smaller than memory which is activated when Docker detects contention or low memory on the host machine. If you use memory-reservation, it must be set lower than memory for it to take precedence. Because it is a soft limit, it doesn't guarantee that the container doesn't exceed the limit.
memorySwap The total memory limit (memory + swap) for the container in MBs. This setting may compute to -1 after pulumi up if the target host doesn't support memory swap, when that is the case docker will use a soft limitation.
mounts Specification for mounts to be added to containers created as part of the service.
mustRun If true, then the Docker container will be kept running. If false, Terraform leaves the container alone. This attribute is also used to trigger a restart of a stopped container. If your container is stopped, Terraform will set mustRun to false and this will trigger a change. Defaults to true.
name The name of the container.
networkDatas The data of the networks the container is connected to.
networkMode Network mode of the container. Defaults to bridge. If your host OS is any other OS, you need to set this value explicitly, e.g. nat when your container will be running on an Windows host. See https://docs.docker.com/engine/network/ for more information.
networksAdvanced The networks the container is attached to. This is the equivalent to the --network option of docker run
pidMode The PID (Process) Namespace mode for the container. Either container:<name|id> or host.
platform Platform in the format os[/arch[/variant]] used for image lookup and container runtime, for example linux/amd64.
ports Publish a container's port(s) to the host.
privileged If true, the container runs in privileged mode.
publishAllPorts Publish all ports of the container.
readOnly If true, the container will be started as readonly. Defaults to false.
removeVolumes If true, it will remove anonymous volumes associated with the container. Defaults to true.
restart The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to no.
rm If true, then the container will be automatically removed when it exits. Defaults to false.
runtime Runtime to use for the container.
securityOpts List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
shmSize Size of /dev/shm in MBs.
start If true, then the Docker container will be started after creation. If false, then the container is only created. Defaults to true.
stdinOpen If true, keep STDIN open even if not attached (docker run -i). Defaults to false.
stopSignal Signal to stop a container (default SIGTERM).
stopTimeout Timeout (in seconds) to stop a container.
storageOpts Key/value pairs for the storage driver options, e.g. size: 120G
sysctls A map of kernel parameters (sysctls) to set in the container.
tmpfs A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.
tty If true, allocate a pseudo-tty (docker run -t). Defaults to false.
ulimits Ulimit options to add.
uploads Specifies files to upload to the container before starting it. Only one of content or contentBase64 can be set and at least one of them has to be set.
user User used for run the first process. Format is user or user:group which user and group can be passed literally or by name.
usernsMode Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
volumes Spec for mounting volumes in the container.
wait If true, then the Docker container is waited for being healthy state after creation. This requires your container to have a healthcheck, otherwise this provider will error. If false, then the container health state is not checked. Defaults to false.
waitTimeout The timeout in seconds to wait the container to be healthy after creation. Defaults to 60.
workingDir The working directory for commands to run in.
Implementation
const ContainerState({
this.attach,
this.bridge,
this.capabilities,
this.cgroupParent,
this.cgroupnsMode,
this.command,
this.containerLogs,
this.containerReadRefreshTimeoutMilliseconds,
this.cpuPeriod,
this.cpuQuota,
this.cpuSet,
this.cpuShares,
this.cpus,
this.destroyGraceSeconds,
this.deviceCgroupRules,
this.deviceReadBps,
this.deviceReadIops,
this.deviceRequests,
this.deviceWriteBps,
this.deviceWriteIops,
this.devices,
this.dns,
this.dnsOpts,
this.dnsSearches,
this.domainname,
this.entrypoints,
this.envs,
this.exitCode,
this.gpus,
this.groupAdds,
this.healthcheck,
this.hostname,
this.hosts,
this.image,
this.init,
this.ipcMode,
this.labels,
this.logDriver,
this.logOpts,
this.logs,
this.maxRetryCount,
this.memory,
this.memoryReservation,
this.memorySwap,
this.mounts,
this.mustRun,
this.name,
this.networkDatas,
this.networkMode,
this.networksAdvanced,
this.pidMode,
this.platform,
this.ports,
this.privileged,
this.publishAllPorts,
this.readOnly,
this.removeVolumes,
this.restart,
this.rm,
this.runtime,
this.securityOpts,
this.shmSize,
this.start,
this.stdinOpen,
this.stopSignal,
this.stopTimeout,
this.storageOpts,
this.sysctls,
this.tmpfs,
this.tty,
this.ulimits,
this.uploads,
this.user,
this.usernsMode,
this.volumes,
this.wait,
this.waitTimeout,
this.workingDir,
});