Skip to content

Commit

Permalink
feature: add Mountpoints in containers/json api
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Wan <zirenwan@gmail.com>
  • Loading branch information
HusterWan authored and allencloud committed May 7, 2019
1 parent 8e1a07b commit 4682150
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apis/server/container_bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ func (s *Server) getContainers(ctx context.Context, rw http.ResponseWriter, req
}
}

mounts := []types.MountPoint{}
for _, mp := range c.Mounts {
mounts = append(mounts, *mp)
}

singleCon := types.Container{
ID: c.ID,
Names: []string{c.Name},
Expand All @@ -173,6 +178,7 @@ func (s *Server) getContainers(ctx context.Context, rw http.ResponseWriter, req
Labels: c.Config.Labels,
HostConfig: c.HostConfig,
NetworkSettings: netSettings,
Mounts: mounts,
}

containerList = append(containerList, singleCon)
Expand Down

0 comments on commit 4682150

Please sign in to comment.