Remove container directory

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2016-08-25 11:18:08 -07:00
parent a27d6e6ff1
commit 6bbdbdeed8

View file

@ -511,6 +511,11 @@ func (s *Server) RemoveContainer(ctx context.Context, req *pb.RemoveContainerReq
return nil, fmt.Errorf("failed to delete container %s: %v", *containerName, err)
}
containerDir := filepath.Join(s.runtime.ContainerDir(), *containerName)
if err := os.RemoveAll(containerDir); err != nil {
return nil, fmt.Errorf("failed to remove container %s directory: %v", *containerName, err)
}
return &pb.RemoveContainerResponse{}, nil
}