Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Copy link
Collaborator

@allencloud allencloud May 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW,in terms of compatibility, I compared pouchcontainer's returns struct and

moby's(https://github.com/moby/moby/blob/master/api/swagger.yaml#L3434-L3501), and found that we still miss:

Ports
State
SizeRw
SizeRootfs

Will all these missing fields affect your usecases? @wangforthinker @zjumoon01

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no effect at the moment. But it is better to add missing filed in returns struct. @allencloud

}

containerList = append(containerList, singleCon)
Expand Down