Beispiel #1
0
func (s *RunSuite) GetContainerByName(c *C, name string) *dockerclient.Container {
	client := GetClient(c)
	container, err := docker.GetContainerByName(client, name)

	c.Assert(err, IsNil)

	if container == nil {
		return nil
	}

	info, err := client.InspectContainer(container.ID)

	c.Assert(err, IsNil)

	return info
}
func (s *CliSuite) GetContainerByName(c *C, name string) *types.ContainerJSON {
	client := GetClient(c)
	container, err := docker.GetContainerByName(client, name)

	c.Assert(err, IsNil)

	if container == nil {
		return nil
	}

	info, err := client.ContainerInspect(context.Background(), container.ID)

	c.Assert(err, IsNil)

	return &info
}