NAME
API::Docker::Type::TaskSpec::ContainerSpec - Container spec for the service
VERSION
version 0.004
DESCRIPTION
Generated from the inline ContainerSpec schema of the TaskSpec definition in spec/v1.51.yaml.
> Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to plugin. NetworkAttachmentSpec is used when the Runtime > field is set to attachment.
image
The image name to use for the container.
labels
User-defined key/value data. The keys are the caller's data and are never translated.
command
The command to be run in the image.
args
Arguments to the command.
hostname
The hostname to use for the container, as a valid RFC 1123 hostname.
env
A list of environment variables in the form VAR=value.
dir
The working directory for commands to run in.
user
The user inside the container.
groups
A list of additional groups that the container process will run as.
privileges
Security options for the container. See API::Docker::Type::TaskSpec::ContainerSpec::Privileges.
tty
Whether a pseudo-TTY should be allocated. Serialised as TTY -- spelled out, because deriving it from the Perl name would produce Tty.
open_stdin
Open stdin.
read_only
Mount the container's root filesystem as read only.
mounts
Specification for mounts to be added to containers created as part of the service. See API::Docker::Type::Mount.
stop_signal
Signal to stop the container.
stop_grace_period
Amount of time to wait for the container to terminate before forcefully killing it.
health_check
A test to perform to check that the container is healthy. See API::Docker::Type::HealthConfig.
hosts
A list of hostname/IP mappings to add to the container's hosts file. The format of extra hosts is specified in the hosts(5) man page:
IP_address canonical_hostname [aliases...].
dns_config
Specification for DNS related configurations in resolver configuration file (resolv.conf). See API::Docker::Type::TaskSpec::ContainerSpec::DNSConfig. Serialised as DNSConfig -- spelled out, because deriving it from the Perl name would produce DnsConfig.
secrets
Secrets contains references to zero or more secrets that will be exposed to the service. See API::Docker::Type::TaskSpec::ContainerSpec::Secret.
oom_score_adj
An integer value containing the score given to the container in order to tune OOM killer preferences.
configs
Configs contains references to zero or more configs that will be exposed to the service. See API::Docker::Type::TaskSpec::ContainerSpec::Config.
isolation
Isolation technology of the containers running the service. (Windows only). The swagger enumerates default, process, hyperv and the empty string.
init
Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used.
sysctls
Set kernel namedspaced parameters (sysctls) in the container. The Sysctls option on services accepts the same sysctls as the are supported on containers. Note that while the same sysctls are supported, no guarantees or checks are made about their suitability for a clustered environment, and it's up to the user to determine whether a given sysctl will work properly in a Service. The keys are the caller's data and are never translated.
capability_add
A list of kernel capabilities to add to the default set for the container.
capability_drop
A list of kernel capabilities to drop from the default set for the container.
ulimits
A list of resource limits to set in the container. For example: {"Name": "nofile", "Soft": 1024, "Hard": 2048}". See API::Docker::Type::TaskSpec::ContainerSpec::Ulimit.
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-api-docker/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <getty@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.