mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
44e10433c7
This breaks the dependency from the remote API implementation to the internal representation of a container. Instead it uses its own partial representation of a container, with only required fields. * This preserves reverse-compatibility with all past implementations of the remote API. * This clarifies which fields are guaranteed to be present in a response A docker remote api server *may* return more fields in a Container object, but their presence and semantics are not guaranteed and should not be relied upon by client implementations. Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
18 lines
291 B
Go
18 lines
291 B
Go
package api
|
|
|
|
import (
|
|
"github.com/dotcloud/docker/nat"
|
|
"github.com/dotcloud/docker/runconfig"
|
|
)
|
|
|
|
type Container struct {
|
|
Config runconfig.Config
|
|
HostConfig runconfig.HostConfig
|
|
State struct {
|
|
Running bool
|
|
ExitCode int
|
|
}
|
|
NetworkSettings struct {
|
|
Ports nat.PortMap
|
|
}
|
|
}
|