Merge pull request #97 from mrunalp/ctr_dir_id

Use container ID as the directory name
This commit is contained in:
Antonio Murdaca 2016-10-05 23:02:25 +02:00 committed by GitHub
commit a5da8a4d1e

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)