Remove container directory
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
a27d6e6ff1
commit
6bbdbdeed8
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue