mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-19 23:41:38 +02:00
feat(container): add State field to Container type
This commit is contained in:
@@ -66,6 +66,7 @@ func FromDocker(c *container.Summary, dockerHost string) (res *types.Container)
|
|||||||
IsExplicit: isExplicit,
|
IsExplicit: isExplicit,
|
||||||
IsHostNetworkMode: c.HostConfig.NetworkMode == "host",
|
IsHostNetworkMode: c.HostConfig.NetworkMode == "host",
|
||||||
Running: c.Status == "running" || c.State == "running",
|
Running: c.Status == "running" || c.State == "running",
|
||||||
|
State: c.State,
|
||||||
}
|
}
|
||||||
|
|
||||||
if agent.IsDockerHostAgent(dockerHost) {
|
if agent.IsDockerHostAgent(dockerHost) {
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ type (
|
|||||||
ContainerName string `json:"container_name"`
|
ContainerName string `json:"container_name"`
|
||||||
ContainerID string `json:"container_id"`
|
ContainerID string `json:"container_id"`
|
||||||
|
|
||||||
|
State container.ContainerState `json:"state"`
|
||||||
|
|
||||||
Agent *agent.AgentConfig `json:"agent"`
|
Agent *agent.AgentConfig `json:"agent"`
|
||||||
|
|
||||||
Labels map[string]string `json:"-"` // for creating routes
|
Labels map[string]string `json:"-"` // for creating routes
|
||||||
|
|||||||
Reference in New Issue
Block a user