server/container: fix bug when listing container IDs
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
217d278623
commit
cfa4a341a6
1 changed files with 2 additions and 1 deletions
|
@ -422,9 +422,10 @@ func (s *Server) ListContainers(ctx context.Context, req *pb.ListContainersReque
|
||||||
cState := s.runtime.ContainerStatus(ctr)
|
cState := s.runtime.ContainerStatus(ctr)
|
||||||
created := cState.Created.Unix()
|
created := cState.Created.Unix()
|
||||||
rState := pb.ContainerState_UNKNOWN
|
rState := pb.ContainerState_UNKNOWN
|
||||||
|
cID := ctr.ID()
|
||||||
|
|
||||||
c := &pb.Container{
|
c := &pb.Container{
|
||||||
Id: &cState.ID,
|
Id: &cID,
|
||||||
PodSandboxId: &podSandboxID,
|
PodSandboxId: &podSandboxID,
|
||||||
CreatedAt: int64Ptr(created),
|
CreatedAt: int64Ptr(created),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue