package types
import "github.com/dotcloud/docker/cli/compose/types"
Index ¶
- Variables
- type Config
- type ConfigDetails
- type ConfigFile
- type DeployConfig
- type Dict
- type External
- type HealthCheckConfig
- type IPAMConfig
- type IPAMPool
- type LoggingConfig
- type NetworkConfig
- type Placement
- type Resource
- type Resources
- type RestartPolicy
- type SecretConfig
- type ServiceConfig
- type ServiceNetworkConfig
- type ServiceSecretConfig
- type UlimitsConfig
- type UnitBytes
- type UpdateConfig
- type VolumeConfig
Variables ¶
var DeprecatedProperties = map[string]string{ "container_name": "Setting the container name is not supported.", "expose": "Exposing ports is unnecessary - services on the same network can access each other's containers on any port.", }
DeprecatedProperties that were removed from the v3 format, but their use should not impact the behaviour of the application.
var ForbiddenProperties = map[string]string{ "extends": "" /* 162 byte string literal not displayed */, "volume_driver": "" /* 137 byte string literal not displayed */, "volumes_from": "" /* 176 byte string literal not displayed */, "cpu_quota": "Set resource limits using deploy.resources", "cpu_shares": "Set resource limits using deploy.resources", "cpuset": "Set resource limits using deploy.resources", "mem_limit": "Set resource limits using deploy.resources", "memswap_limit": "Set resource limits using deploy.resources", }
ForbiddenProperties that are not supported in this implementation of the compose file.
var UnsupportedProperties = []string{ "build", "cap_add", "cap_drop", "cgroup_parent", "devices", "dns", "dns_search", "domainname", "external_links", "ipc", "links", "mac_address", "network_mode", "privileged", "read_only", "restart", "security_opt", "shm_size", "stop_signal", "sysctls", "tmpfs", "userns_mode", }
UnsupportedProperties not yet supported by this implementation of the compose file
Types ¶
type Config ¶
type Config struct { Services []ServiceConfig Networks map[string]NetworkConfig Volumes map[string]VolumeConfig Secrets map[string]SecretConfig }
Config is a full compose file configuration
type ConfigDetails ¶
type ConfigDetails struct { WorkingDir string ConfigFiles []ConfigFile Environment map[string]string }
ConfigDetails are the details about a group of ConfigFiles
type ConfigFile ¶
ConfigFile is a filename and the contents of the file as a Dict
type DeployConfig ¶
type DeployConfig struct { Mode string Replicas *uint64 Labels map[string]string `compose:"list_or_dict_equals"` UpdateConfig *UpdateConfig `mapstructure:"update_config"` Resources Resources RestartPolicy *RestartPolicy `mapstructure:"restart_policy"` Placement Placement }
DeployConfig the deployment configuration for a service
type Dict ¶
type Dict map[string]interface{}
Dict is a mapping of strings to interface{}
type External ¶
External identifies a Volume or Network as a reference to a resource that is not managed, and should already exist.
type HealthCheckConfig ¶
type HealthCheckConfig struct { Test []string `compose:"healthcheck"` Timeout string Interval string Retries *uint64 Disable bool }
HealthCheckConfig the healthcheck configuration for a service
type IPAMConfig ¶
IPAMConfig for a network
type IPAMPool ¶
type IPAMPool struct { Subnet string }
IPAMPool for a network
type LoggingConfig ¶
LoggingConfig the logging configuration for a service
type NetworkConfig ¶
type NetworkConfig struct { Driver string DriverOpts map[string]string `mapstructure:"driver_opts"` Ipam IPAMConfig External External Internal bool Labels map[string]string `compose:"list_or_dict_equals"` }
NetworkConfig for a network
type Placement ¶
type Placement struct { Constraints []string }
Placement constraints for the service
type Resource ¶
type Resource struct { // TODO: types to convert from units and ratios NanoCPUs string `mapstructure:"cpus"` MemoryBytes UnitBytes `mapstructure:"memory"` }
Resource is a resource to be limited or reserved
type Resources ¶
Resources the resource limits and reservations
type RestartPolicy ¶
type RestartPolicy struct { Condition string Delay *time.Duration MaxAttempts *uint64 `mapstructure:"max_attempts"` Window *time.Duration }
RestartPolicy the service restart policy
type SecretConfig ¶
type SecretConfig struct { File string External External Labels map[string]string `compose:"list_or_dict_equals"` }
SecretConfig for a secret
type ServiceConfig ¶
type ServiceConfig struct { Name string CapAdd []string `mapstructure:"cap_add"` CapDrop []string `mapstructure:"cap_drop"` CgroupParent string `mapstructure:"cgroup_parent"` Command []string `compose:"shell_command"` ContainerName string `mapstructure:"container_name"` DependsOn []string `mapstructure:"depends_on"` Deploy DeployConfig Devices []string DNS []string `compose:"string_or_list"` DNSSearch []string `mapstructure:"dns_search" compose:"string_or_list"` DomainName string `mapstructure:"domainname"` Entrypoint []string `compose:"shell_command"` Environment map[string]string `compose:"list_or_dict_equals"` Expose []string `compose:"list_of_strings_or_numbers"` ExternalLinks []string `mapstructure:"external_links"` ExtraHosts map[string]string `mapstructure:"extra_hosts" compose:"list_or_dict_colon"` Hostname string HealthCheck *HealthCheckConfig Image string Ipc string Labels map[string]string `compose:"list_or_dict_equals"` Links []string Logging *LoggingConfig MacAddress string `mapstructure:"mac_address"` NetworkMode string `mapstructure:"network_mode"` Networks map[string]*ServiceNetworkConfig `compose:"list_or_struct_map"` Pid string Ports []string `compose:"list_of_strings_or_numbers"` Privileged bool ReadOnly bool `mapstructure:"read_only"` Restart string Secrets []ServiceSecretConfig SecurityOpt []string `mapstructure:"security_opt"` StdinOpen bool `mapstructure:"stdin_open"` StopGracePeriod *time.Duration `mapstructure:"stop_grace_period"` StopSignal string `mapstructure:"stop_signal"` Tmpfs []string `compose:"string_or_list"` Tty bool `mapstructure:"tty"` Ulimits map[string]*UlimitsConfig User string Volumes []string WorkingDir string `mapstructure:"working_dir"` }
ServiceConfig is the configuration of one service
type ServiceNetworkConfig ¶
type ServiceNetworkConfig struct { Aliases []string Ipv4Address string `mapstructure:"ipv4_address"` Ipv6Address string `mapstructure:"ipv6_address"` }
ServiceNetworkConfig is the network configuration for a service
type ServiceSecretConfig ¶
ServiceSecretConfig is the secret configuration for a service
type UlimitsConfig ¶
UlimitsConfig the ulimit configuration
type UnitBytes ¶
type UnitBytes int64
UnitBytes is the bytes type
type UpdateConfig ¶
type UpdateConfig struct { Parallelism *uint64 Delay time.Duration FailureAction string `mapstructure:"failure_action"` Monitor time.Duration MaxFailureRatio float32 `mapstructure:"max_failure_ratio"` }
UpdateConfig the service update configuration
type VolumeConfig ¶
type VolumeConfig struct { Driver string DriverOpts map[string]string `mapstructure:"driver_opts"` External External Labels map[string]string `compose:"list_or_dict_equals"` }
VolumeConfig for a volume
Source Files ¶
- Version
- v1.13.1
- Published
- Feb 8, 2017
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 1 minute ago –
Tools for package owners.