Interface TaskContainerProperties.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<TaskContainerProperties.Builder,
,TaskContainerProperties> SdkBuilder<TaskContainerProperties.Builder,
,TaskContainerProperties> SdkPojo
- Enclosing class:
TaskContainerProperties
-
Method Summary
Modifier and TypeMethodDescriptionThe command that's passed to the container.command
(Collection<String> command) The command that's passed to the container.dependsOn
(Collection<TaskContainerDependency> dependsOn) A list of containers that this container depends on.dependsOn
(Consumer<TaskContainerDependency.Builder>... dependsOn) A list of containers that this container depends on.dependsOn
(TaskContainerDependency... dependsOn) A list of containers that this container depends on.environment
(Collection<KeyValuePair> environment) The environment variables to pass to a container.environment
(Consumer<KeyValuePair.Builder>... environment) The environment variables to pass to a container.environment
(KeyValuePair... environment) The environment variables to pass to a container.If the essential parameter of a container is marked astrue
, and that container fails or stops for any reason, all other containers that are part of the task are stopped.The image used to start a container.default TaskContainerProperties.Builder
linuxParameters
(Consumer<LinuxParameters.Builder> linuxParameters) Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.linuxParameters
(LinuxParameters linuxParameters) Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.default TaskContainerProperties.Builder
logConfiguration
(Consumer<LogConfiguration.Builder> logConfiguration) The log configuration specification for the container.logConfiguration
(LogConfiguration logConfiguration) The log configuration specification for the container.mountPoints
(Collection<MountPoint> mountPoints) The mount points for data volumes in your container.mountPoints
(Consumer<MountPoint.Builder>... mountPoints) The mount points for data volumes in your container.mountPoints
(MountPoint... mountPoints) The mount points for data volumes in your container.The name of a container.privileged
(Boolean privileged) When this parameter istrue
, the container is given elevated privileges on the host container instance (similar to theroot
user).readonlyRootFilesystem
(Boolean readonlyRootFilesystem) When this parameter is true, the container is given read-only access to its root file system.default TaskContainerProperties.Builder
repositoryCredentials
(Consumer<RepositoryCredentials.Builder> repositoryCredentials) The private repository authentication credentials to use.repositoryCredentials
(RepositoryCredentials repositoryCredentials) The private repository authentication credentials to use.resourceRequirements
(Collection<ResourceRequirement> resourceRequirements) The type and amount of a resource to assign to a container.resourceRequirements
(Consumer<ResourceRequirement.Builder>... resourceRequirements) The type and amount of a resource to assign to a container.resourceRequirements
(ResourceRequirement... resourceRequirements) The type and amount of a resource to assign to a container.secrets
(Collection<Secret> secrets) The secrets to pass to the container.secrets
(Consumer<Secret.Builder>... secrets) The secrets to pass to the container.The secrets to pass to the container.ulimits
(Collection<Ulimit> ulimits) A list ofulimits
to set in the container.ulimits
(Consumer<Ulimit.Builder>... ulimits) A list ofulimits
to set in the container.A list ofulimits
to set in the container.The user to use inside the container.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
command
The command that's passed to the container. This parameter maps to
Cmd
in the Create a container section of the Docker Remote API and theCOMMAND
parameter to docker run. For more information, see Dockerfile reference: CMD.- Parameters:
command
- The command that's passed to the container. This parameter maps toCmd
in the Create a container section of the Docker Remote API and theCOMMAND
parameter to docker run. For more information, see Dockerfile reference: CMD.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
command
The command that's passed to the container. This parameter maps to
Cmd
in the Create a container section of the Docker Remote API and theCOMMAND
parameter to docker run. For more information, see Dockerfile reference: CMD.- Parameters:
command
- The command that's passed to the container. This parameter maps toCmd
in the Create a container section of the Docker Remote API and theCOMMAND
parameter to docker run. For more information, see Dockerfile reference: CMD.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dependsOn
A list of containers that this container depends on.
- Parameters:
dependsOn
- A list of containers that this container depends on.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dependsOn
A list of containers that this container depends on.
- Parameters:
dependsOn
- A list of containers that this container depends on.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dependsOn
A list of containers that this container depends on.
This is a convenience method that creates an instance of theTaskContainerDependency.Builder
avoiding the need to create one manually viaTaskContainerDependency.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed todependsOn(List<TaskContainerDependency>)
.- Parameters:
dependsOn
- a consumer that will call methods onTaskContainerDependency.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
environment
The environment variables to pass to a container. This parameter maps to Env inthe Create a container section of the Docker Remote API and the
--env
parameter to docker run.We don't recommend using plaintext environment variables for sensitive information, such as credential data.
Environment variables cannot start with
AWS_BATCH
. This naming convention is reserved for variables that Batch sets.- Parameters:
environment
- The environment variables to pass to a container. This parameter maps to Env inthe Create a container section of the Docker Remote API and the--env
parameter to docker run.We don't recommend using plaintext environment variables for sensitive information, such as credential data.
Environment variables cannot start with
AWS_BATCH
. This naming convention is reserved for variables that Batch sets.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environment
The environment variables to pass to a container. This parameter maps to Env inthe Create a container section of the Docker Remote API and the
--env
parameter to docker run.We don't recommend using plaintext environment variables for sensitive information, such as credential data.
Environment variables cannot start with
AWS_BATCH
. This naming convention is reserved for variables that Batch sets.- Parameters:
environment
- The environment variables to pass to a container. This parameter maps to Env inthe Create a container section of the Docker Remote API and the--env
parameter to docker run.We don't recommend using plaintext environment variables for sensitive information, such as credential data.
Environment variables cannot start with
AWS_BATCH
. This naming convention is reserved for variables that Batch sets.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environment
The environment variables to pass to a container. This parameter maps to Env inthe Create a container section of the Docker Remote API and the
--env
parameter to docker run.We don't recommend using plaintext environment variables for sensitive information, such as credential data.
Environment variables cannot start with
AWS_BATCH
. This naming convention is reserved for variables that Batch sets.KeyValuePair.Builder
avoiding the need to create one manually viaKeyValuePair.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toenvironment(List<KeyValuePair>)
.- Parameters:
environment
- a consumer that will call methods onKeyValuePair.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
essential
If the essential parameter of a container is marked as
true
, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If theessential
parameter of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
- Parameters:
essential
- If the essential parameter of a container is marked astrue
, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If theessential
parameter of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
image
The image used to start a container. This string is passed directly to the Docker daemon. By default, images in the Docker Hub registry are available. Other repositories are specified with either
repository-url/image:tag
orrepository-url/image@digest
. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps toImage
in the Create a container section of the Docker Remote API and theIMAGE
parameter of the docker run .- Parameters:
image
- The image used to start a container. This string is passed directly to the Docker daemon. By default, images in the Docker Hub registry are available. Other repositories are specified with eitherrepository-url/image:tag
orrepository-url/image@digest
. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps toImage
in the Create a container section of the Docker Remote API and theIMAGE
parameter of the docker run .- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
linuxParameters
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities.
- Parameters:
linuxParameters
- Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
linuxParameters
default TaskContainerProperties.Builder linuxParameters(Consumer<LinuxParameters.Builder> linuxParameters) Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities.
This is a convenience method that creates an instance of theLinuxParameters.Builder
avoiding the need to create one manually viaLinuxParameters.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tolinuxParameters(LinuxParameters)
.- Parameters:
linuxParameters
- a consumer that will call methods onLinuxParameters.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
logConfiguration
The log configuration specification for the container.
This parameter maps to
LogConfig
in the Create a container section of the Docker Remote API and the--log-driver
option to docker run.By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfiguration
data type). Additional log drivers may be available in future releases of the Amazon ECS container agent.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'
The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the
ECS_AVAILABLE_LOGGING_DRIVERS
environment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide.- Parameters:
logConfiguration
- The log configuration specification for the container.This parameter maps to
LogConfig
in the Create a container section of the Docker Remote API and the--log-driver
option to docker run.By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfiguration
data type). Additional log drivers may be available in future releases of the Amazon ECS container agent.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'
The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the
ECS_AVAILABLE_LOGGING_DRIVERS
environment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
logConfiguration
default TaskContainerProperties.Builder logConfiguration(Consumer<LogConfiguration.Builder> logConfiguration) The log configuration specification for the container.
This parameter maps to
LogConfig
in the Create a container section of the Docker Remote API and the--log-driver
option to docker run.By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfiguration
data type). Additional log drivers may be available in future releases of the Amazon ECS container agent.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'
The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the
ECS_AVAILABLE_LOGGING_DRIVERS
environment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide.LogConfiguration.Builder
avoiding the need to create one manually viaLogConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tologConfiguration(LogConfiguration)
.- Parameters:
logConfiguration
- a consumer that will call methods onLogConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
mountPoints
The mount points for data volumes in your container.
This parameter maps to
Volumes
in the Create a container section of the Docker Remote API and the --volume option to docker run.Windows containers can mount whole directories on the same drive as
$env:ProgramData
. Windows containers can't mount directories on a different drive, and mount point can't be across drives.- Parameters:
mountPoints
- The mount points for data volumes in your container.This parameter maps to
Volumes
in the Create a container section of the Docker Remote API and the --volume option to docker run.Windows containers can mount whole directories on the same drive as
$env:ProgramData
. Windows containers can't mount directories on a different drive, and mount point can't be across drives.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
mountPoints
The mount points for data volumes in your container.
This parameter maps to
Volumes
in the Create a container section of the Docker Remote API and the --volume option to docker run.Windows containers can mount whole directories on the same drive as
$env:ProgramData
. Windows containers can't mount directories on a different drive, and mount point can't be across drives.- Parameters:
mountPoints
- The mount points for data volumes in your container.This parameter maps to
Volumes
in the Create a container section of the Docker Remote API and the --volume option to docker run.Windows containers can mount whole directories on the same drive as
$env:ProgramData
. Windows containers can't mount directories on a different drive, and mount point can't be across drives.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
mountPoints
The mount points for data volumes in your container.
This parameter maps to
Volumes
in the Create a container section of the Docker Remote API and the --volume option to docker run.Windows containers can mount whole directories on the same drive as
This is a convenience method that creates an instance of the$env:ProgramData
. Windows containers can't mount directories on a different drive, and mount point can't be across drives.MountPoint.Builder
avoiding the need to create one manually viaMountPoint.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tomountPoints(List<MountPoint>)
.- Parameters:
mountPoints
- a consumer that will call methods onMountPoint.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
name
The name of a container. The name can be used as a unique identifier to target your
dependsOn
andOverrides
objects.- Parameters:
name
- The name of a container. The name can be used as a unique identifier to target yourdependsOn
andOverrides
objects.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
privileged
When this parameter is
true
, the container is given elevated privileges on the host container instance (similar to theroot
user). This parameter maps toPrivileged
in the Create a container section of the Docker Remote API and the--privileged
option to docker run.This parameter is not supported for Windows containers or tasks run on Fargate.
- Parameters:
privileged
- When this parameter istrue
, the container is given elevated privileges on the host container instance (similar to theroot
user). This parameter maps toPrivileged
in the Create a container section of the Docker Remote API and the--privileged
option to docker run.This parameter is not supported for Windows containers or tasks run on Fargate.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
readonlyRootFilesystem
When this parameter is true, the container is given read-only access to its root file system. This parameter maps to
ReadonlyRootfs
in the Create a container section of the Docker Remote API and the--read-only
option to docker run.This parameter is not supported for Windows containers.
- Parameters:
readonlyRootFilesystem
- When this parameter is true, the container is given read-only access to its root file system. This parameter maps toReadonlyRootfs
in the Create a container section of the Docker Remote API and the--read-only
option to docker run.This parameter is not supported for Windows containers.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
repositoryCredentials
The private repository authentication credentials to use.
- Parameters:
repositoryCredentials
- The private repository authentication credentials to use.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
repositoryCredentials
default TaskContainerProperties.Builder repositoryCredentials(Consumer<RepositoryCredentials.Builder> repositoryCredentials) The private repository authentication credentials to use.
This is a convenience method that creates an instance of theRepositoryCredentials.Builder
avoiding the need to create one manually viaRepositoryCredentials.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed torepositoryCredentials(RepositoryCredentials)
.- Parameters:
repositoryCredentials
- a consumer that will call methods onRepositoryCredentials.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
resourceRequirements
TaskContainerProperties.Builder resourceRequirements(Collection<ResourceRequirement> resourceRequirements) The type and amount of a resource to assign to a container. The only supported resource is a GPU.
- Parameters:
resourceRequirements
- The type and amount of a resource to assign to a container. The only supported resource is a GPU.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
resourceRequirements
The type and amount of a resource to assign to a container. The only supported resource is a GPU.
- Parameters:
resourceRequirements
- The type and amount of a resource to assign to a container. The only supported resource is a GPU.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
resourceRequirements
TaskContainerProperties.Builder resourceRequirements(Consumer<ResourceRequirement.Builder>... resourceRequirements) The type and amount of a resource to assign to a container. The only supported resource is a GPU.
This is a convenience method that creates an instance of theResourceRequirement.Builder
avoiding the need to create one manually viaResourceRequirement.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toresourceRequirements(List<ResourceRequirement>)
.- Parameters:
resourceRequirements
- a consumer that will call methods onResourceRequirement.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
secrets
The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.
- Parameters:
secrets
- The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
secrets
The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.
- Parameters:
secrets
- The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
secrets
The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.
This is a convenience method that creates an instance of theSecret.Builder
avoiding the need to create one manually viaSecret.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tosecrets(List<Secret>)
.- Parameters:
secrets
- a consumer that will call methods onSecret.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
ulimits
A list of
ulimits
to set in the container. If aulimit
value is specified in a task definition, it overrides the default values set by Docker. This parameter maps toUlimits
in the Create a container section of the Docker Remote API and the--ulimit
option to docker run.Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The
nofile
resource limit sets a restriction on the number of open files that a container can use. The defaultnofile
soft limit is1024
and the default hard limit is65535
.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
- Parameters:
ulimits
- A list ofulimits
to set in the container. If aulimit
value is specified in a task definition, it overrides the default values set by Docker. This parameter maps toUlimits
in the Create a container section of the Docker Remote API and the--ulimit
option to docker run.Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The
nofile
resource limit sets a restriction on the number of open files that a container can use. The defaultnofile
soft limit is1024
and the default hard limit is65535
.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ulimits
A list of
ulimits
to set in the container. If aulimit
value is specified in a task definition, it overrides the default values set by Docker. This parameter maps toUlimits
in the Create a container section of the Docker Remote API and the--ulimit
option to docker run.Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The
nofile
resource limit sets a restriction on the number of open files that a container can use. The defaultnofile
soft limit is1024
and the default hard limit is65535
.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
- Parameters:
ulimits
- A list ofulimits
to set in the container. If aulimit
value is specified in a task definition, it overrides the default values set by Docker. This parameter maps toUlimits
in the Create a container section of the Docker Remote API and the--ulimit
option to docker run.Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The
nofile
resource limit sets a restriction on the number of open files that a container can use. The defaultnofile
soft limit is1024
and the default hard limit is65535
.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ulimits
A list of
ulimits
to set in the container. If aulimit
value is specified in a task definition, it overrides the default values set by Docker. This parameter maps toUlimits
in the Create a container section of the Docker Remote API and the--ulimit
option to docker run.Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The
nofile
resource limit sets a restriction on the number of open files that a container can use. The defaultnofile
soft limit is1024
and the default hard limit is65535
.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
Ulimit.Builder
avoiding the need to create one manually viaUlimit.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toulimits(List<Ulimit>)
.- Parameters:
ulimits
- a consumer that will call methods onUlimit.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
user
The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run.
When running tasks using the
host
network mode, don't run containers using theroot user (UID 0)
. We recommend using a non-root user for better security.You can specify the
user
using the following formats. If specifying a UID or GID, you must specify it as a positive integer.-
user
-
user:group
-
uid
-
uid:gid
-
user:gi
-
uid:group
This parameter is not supported for Windows containers.
- Parameters:
user
- The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run.When running tasks using the
host
network mode, don't run containers using theroot user (UID 0)
. We recommend using a non-root user for better security.You can specify the
user
using the following formats. If specifying a UID or GID, you must specify it as a positive integer.-
user
-
user:group
-
uid
-
uid:gid
-
user:gi
-
uid:group
This parameter is not supported for Windows containers.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-