Use container ID as the directory name

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2016-10-05 12:18:56 -07:00
parent e9ab839955
commit e82426fa8f

View file

@ -74,7 +74,7 @@ func (s *Server) CreateContainer(ctx context.Context, req *pb.CreateContainerReq
}
// containerDir is the dir for the container bundle.
containerDir := filepath.Join(s.runtime.ContainerDir(), name)
containerDir := filepath.Join(s.runtime.ContainerDir(), containerID)
if _, err = os.Stat(containerDir); err == nil {
return nil, fmt.Errorf("container (%s) already exists", containerDir)