ServiceTaskSpecContainerSpec constructor

const ServiceTaskSpecContainerSpec({
  1. Input<List<String>?>? args,
  2. Input<List<String>?>? capAdds,
  3. Input<List<String>?>? capDrops,
  4. Input<List<String>?>? commands,
  5. Input<List<ServiceTaskSpecContainerSpecConfig>?>? configs,
  6. Input<String?>? dir,
  7. Input<ServiceTaskSpecContainerSpecDnsConfig?>? dnsConfig,
  8. Input<Map<String, String>?>? env,
  9. Input<List<String>?>? groups,
  10. Input<ServiceTaskSpecContainerSpecHealthcheck?>? healthcheck,
  11. Input<String?>? hostname,
  12. Input<List<ServiceTaskSpecContainerSpecHost>?>? hosts,
  13. required Input<String> image,
  14. Input<bool?>? init,
  15. Input<String?>? isolation,
  16. Input<List<ServiceTaskSpecContainerSpecLabel>?>? labels,
  17. Input<List<ServiceTaskSpecContainerSpecMount>?>? mounts,
  18. Input<ServiceTaskSpecContainerSpecPrivileges?>? privileges,
  19. Input<bool?>? readOnly,
  20. Input<List<ServiceTaskSpecContainerSpecSecret>?>? secrets,
  21. Input<String?>? stopGracePeriod,
  22. Input<String?>? stopSignal,
  23. Input<Map<String, String>?>? sysctl,
  24. Input<String?>? user,
})

Creates a new ServiceTaskSpecContainerSpec. args Arguments to the command capAdds List of Linux capabilities to add to the container capDrops List of Linux capabilities to drop from the container commands The command/entrypoint to be run in the image. According to the docker cli the override of the entrypoint is also passed to the command property and there is no entrypoint attribute in the ContainerSpec of the service. configs References to zero or more configs that will be exposed to the service dir The working directory for commands to run in dnsConfig Specification for DNS related configurations in resolver configuration file (resolv.conf) env A list of environment variables in the form VAR="value" groups A list of additional groups that the container process will run as healthcheck A test to perform to check that the container is healthy. It works in the same way, and has the same default values, as the HEALTHCHECK Dockerfile instruction set by the service's Docker image. Your Compose file can override the values set in the Dockerfile. hostname The hostname to use for the container, as a valid RFC 1123 hostname hosts A list of hostname/IP mappings to add to the container's hosts file image The image name to use for the containers of the service, like nginx:1.17.6. Also use the data-source or resource of docker.RemoteImage with the repoDigest or docker.RegistryImage with the name attribute for this, as shown in the examples. init Configured whether an init process should be injected for this container. If unset this will default to the dockerd defaults. isolation Isolation technology of the containers running the service. (Windows only). Defaults to default. labels User-defined key/value metadata mounts Specification for mounts to be added to containers created as part of the service privileges Security options for the container readOnly Mount the container's root filesystem as read only secrets References to zero or more secrets that will be exposed to the service stopGracePeriod Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or '0s' the destroy will not check if all tasks/containers of the service terminate. stopSignal Signal to stop the container sysctl Sysctls config (Linux only) user The user inside the container

Implementation

const ServiceTaskSpecContainerSpec({
  this.args,
  this.capAdds,
  this.capDrops,
  this.commands,
  this.configs,
  this.dir,
  this.dnsConfig,
  this.env,
  this.groups,
  this.healthcheck,
  this.hostname,
  this.hosts,
  required this.image,
  this.init,
  this.isolation,
  this.labels,
  this.mounts,
  this.privileges,
  this.readOnly,
  this.secrets,
  this.stopGracePeriod,
  this.stopSignal,
  this.sysctl,
  this.user,
});