NoHealthcheck="none"// Indicates there is no healthcheck
Starting="starting"// Starting indicates that the container is not yet ready
Healthy="healthy"// Healthy indicates that the container is running correctly
Unhealthy="unhealthy"// Unhealthy indicates that the container has a problem
)
// Health stores information about the container's healthcheck results
typeHealthstruct{
Statusstring// Status is one of Starting, Healthy or Unhealthy
FailingStreakint// FailingStreak is the number of consecutive failures
Log[]*HealthcheckResult// Log contains the last few results (oldest first)
}
// ContainerState stores container's running state
// it's part of ContainerJSONBase and will return by "inspect" command
typeContainerStatestruct{
Statusstring// String representation of the container state. Can be one of "created", "running", "paused", "restarting", "removing", "exited", or "dead"
Runningbool
Pausedbool
Restartingbool
OOMKilledbool
Deadbool
Pidint
ExitCodeint
Errorstring
StartedAtstring
FinishedAtstring
Health*Health`json:",omitempty"`
}
// ContainerNode stores information about the node that a container
// is running on. It's only available in Docker Swarm
typeContainerNodestruct{
IDstring
IPAddressstring`json:"IP"`
Addrstring
Namestring
Cpusint
Memoryint64
Labelsmap[string]string
}
// ContainerJSONBase contains response of Engine API:
// GET "/containers/{name:.*}/json"
typeContainerJSONBasestruct{
IDstring`json:"Id"`
Createdstring
Pathstring
Args[]string
State*ContainerState
Imagestring
ResolvConfPathstring
HostnamePathstring
HostsPathstring
LogPathstring
Node*ContainerNode`json:",omitempty"`
Namestring
RestartCountint
Driverstring
Platformstring
MountLabelstring
ProcessLabelstring
AppArmorProfilestring
ExecIDs[]string
HostConfig*container.HostConfig
GraphDriverGraphDriverData
SizeRw*int64`json:",omitempty"`
SizeRootFs*int64`json:",omitempty"`
}
// ContainerJSON is newly used struct along with MountPoint
typeContainerJSONstruct{
*ContainerJSONBase
Mounts[]MountPoint
Config*container.Config
NetworkSettings*NetworkSettings
}
// NetworkSettings exposes the network settings in the api
typeNetworkSettingsstruct{
NetworkSettingsBase
DefaultNetworkSettings
Networksmap[string]*network.EndpointSettings
}
// SummaryNetworkSettings provides a summary of container's networks
// in /containers/json
typeSummaryNetworkSettingsstruct{
Networksmap[string]*network.EndpointSettings
}
// NetworkSettingsBase holds basic information about networks
typeNetworkSettingsBasestruct{
Bridgestring// Bridge is the Bridge name the network uses(e.g. `docker0`)
SandboxIDstring// SandboxID uniquely represents a container's network stack
HairpinModebool// HairpinMode specifies if hairpin NAT should be enabled on the virtual interface
LinkLocalIPv6Addressstring// LinkLocalIPv6Address is an IPv6 unicast address using the link-local prefix
LinkLocalIPv6PrefixLenint// LinkLocalIPv6PrefixLen is the prefix length of an IPv6 unicast address
Portsnat.PortMap// Ports is a collection of PortBinding indexed by Port
SandboxKeystring// SandboxKey identifies the sandbox
SecondaryIPAddresses[]network.Address
SecondaryIPv6Addresses[]network.Address
}
// DefaultNetworkSettings holds network information
// during the 2 release deprecation period.
// It will be removed in Docker 1.11.
typeDefaultNetworkSettingsstruct{
EndpointIDstring// EndpointID uniquely represents a service endpoint in a Sandbox
Gatewaystring// Gateway holds the gateway address for the network
GlobalIPv6Addressstring// GlobalIPv6Address holds network's global IPv6 address
GlobalIPv6PrefixLenint// GlobalIPv6PrefixLen represents mask length of network's global IPv6 address
IPAddressstring// IPAddress holds the IPv4 address for the network
IPPrefixLenint// IPPrefixLen represents mask length of network's IPv4 address
IPv6Gatewaystring// IPv6Gateway holds gateway address specific for IPv6
MacAddressstring// MacAddress holds the MAC address for the network
}
// MountPoint represents a mount point configuration inside the container.
// This is used for reporting the mountpoints in use by a container.
typeMountPointstruct{
Typemount.Type`json:",omitempty"`
Namestring`json:",omitempty"`
Sourcestring
Destinationstring
Driverstring`json:",omitempty"`
Modestring
RWbool
Propagationmount.Propagation
}
// NetworkResource is the body of the "get network" http response message
typeNetworkResourcestruct{
Namestring// Name is the requested name of the network
IDstring`json:"Id"`// ID uniquely identifies a network on a single machine
Createdtime.Time// Created is the time the network created
Scopestring// Scope describes the level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level)
Driverstring// Driver is the Driver name used to create the network (e.g. `bridge`, `overlay`)
EnableIPv6bool// EnableIPv6 represents whether to enable IPv6
IPAMnetwork.IPAM// IPAM is the network's IP Address Management
Internalbool// Internal represents if the network is used internal only
Attachablebool// Attachable represents if the global scope is manually attachable by regular containers from workers in swarm mode.
Ingressbool// Ingress indicates the network is providing the routing-mesh for the swarm cluster.
ConfigFromnetwork.ConfigReference// ConfigFrom specifies the source which will provide the configuration for this network.
ConfigOnlybool// ConfigOnly networks are place-holder networks for network configurations to be used by other networks. ConfigOnly networks cannot be used directly to run containers or services.
Containersmap[string]EndpointResource// Containers contains endpoints belonging to the network
Optionsmap[string]string// Options holds the network specific options to use for when creating the network
Labelsmap[string]string// Labels holds metadata specific to the network being created
Peers[]network.PeerInfo`json:",omitempty"`// List of peer nodes for an overlay network