You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
api/types: move container-inspect types to api/types/container
This moves the `ContainerJSONBase`, `ContainerJSON` and `ContainerNode`
types to the api/types/container package and deprecates the old location.
- `ContainerJSONBase` was renamed to `InspectBase`
- `ContainerJSON` was rnamed to `InspectResponse`
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Copy file name to clipboardExpand all lines: api/types/container/container.go
+60-1Lines changed: 60 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ import (
6
6
"time"
7
7
8
8
"github.com/docker/docker/api/types/mount"
9
+
"github.com/docker/docker/api/types/storage"
9
10
)
10
11
11
12
// PruneReport contains the response for Engine API:
@@ -90,7 +91,7 @@ type MountPoint struct {
90
91
}
91
92
92
93
// State stores container's running state
93
-
// it's part of ContainerJSONBase and will return by "inspect" command
94
+
// it's part of InspectBase and returned by "inspect" command
94
95
typeStatestruct {
95
96
Statusstring// String representation of the container state. Can be one of "created", "running", "paused", "restarting", "removing", "exited", or "dead"
96
97
Runningbool
@@ -128,3 +129,61 @@ type Summary struct {
128
129
NetworkSettings*NetworkSettingsSummary
129
130
Mounts []MountPoint
130
131
}
132
+
133
+
// ContainerNode stores information about the node that a container
134
+
// is running on. It's only used by the Docker Swarm standalone API.
135
+
//
136
+
// Deprecated: ContainerNode was used for the classic Docker Swarm standalone API. It will be removed in the next release.
137
+
typeContainerNodestruct {
138
+
IDstring
139
+
IPAddressstring`json:"IP"`
140
+
Addrstring
141
+
Namestring
142
+
Cpusint
143
+
Memoryint64
144
+
Labelsmap[string]string
145
+
}
146
+
147
+
// InspectBase contains response of Engine API GET "/containers/{name:.*}/json"
148
+
// for API version 1.18 and older.
149
+
//
150
+
// TODO(thaJeztah): combine InspectBase and InspectResponse into a single struct.
151
+
// The split between InspectBase (ContainerJSONBase) and InspectResponse (InspectResponse)
152
+
// was done in commit 6deaa58ba5f051039643cedceee97c8695e2af74 (https://github.com/moby/moby/pull/13675).
153
+
// ContainerJSONBase contained all fields for API < 1.19, and InspectResponse
154
+
// held fields that were added in API 1.19 and up. Given that the minimum
155
+
// supported API version is now 1.24, we no longer use the separate type.
156
+
typeInspectBasestruct {
157
+
IDstring`json:"Id"`
158
+
Createdstring
159
+
Pathstring
160
+
Args []string
161
+
State*State
162
+
Imagestring
163
+
ResolvConfPathstring
164
+
HostnamePathstring
165
+
HostsPathstring
166
+
LogPathstring
167
+
Node*ContainerNode`json:",omitempty"`// Deprecated: Node was only propagated by Docker Swarm standalone API. It sill be removed in the next release.
168
+
Namestring
169
+
RestartCountint
170
+
Driverstring
171
+
Platformstring
172
+
MountLabelstring
173
+
ProcessLabelstring
174
+
AppArmorProfilestring
175
+
ExecIDs []string
176
+
HostConfig*HostConfig
177
+
GraphDriver storage.DriverData
178
+
SizeRw*int64`json:",omitempty"`
179
+
SizeRootFs*int64`json:",omitempty"`
180
+
}
181
+
182
+
// InspectResponse is the response for the GET "/containers/{name:.*}/json"
0 commit comments