// GetContainerState returns whether a container exists and if it does whether it's running
GetContainerState returns whether a container exists and if it does whether it's running
// GetContainerState returns whether a container exists and if it does whether it ' s running
func (h *Helper) GetContainerState(id string) (*types.ContainerJSON, bool, error) {
	glog.V(5).Infof("Inspecting docker container %q", id)
	container, err := h.client.ContainerInspect(id)
	if err != nil {
		if client.IsErrContainerNotFound(err) {
			glog.V(5).Infof("Container %q was not found", id)
			return nil, false, nil
		}
		glog.V(5).Infof("An error occurred inspecting container %q: %v", id, err)
		return nil, false, err
	}
	glog.V(5).Infof("Container inspect result: %#v", container)
	running := container.State != nil && container.State.Running
	glog.V(5).Infof("Container running = %v", running)
	return container, running, nil
}
func ( h * Helper ) GetContainerState ( id string ) ( * types . ContainerJSON , bool , error ) { glog . V ( 5 ) . Infof ( " " , id ) container , err := h . client . ContainerInspect ( id ) if err != nil { if client . IsErrContainerNotFound ( err ) { glog . V ( 5 ) . Infof ( " " , id ) return nil , false , nil } glog . V ( 5 ) . Infof ( " " , id , err ) return nil , false , err } glog . V ( 5 ) . Infof ( " " , container ) running := container . State != nil && container . State . Running glog . V ( 5 ) . Infof ( " " , running ) return container , running , nil }
GetContainerState returns whether a container exists and if it does whether it's running
GetContainerState returns whether a container exists and if it does whether it ' s running