public static ContainerState getContainerState ( String containerId , DockerClient dockerClient ) { ContainerState result = null ; try { InspectContainerResponse resp = dockerClient . inspectContainerCmd ( containerId ) . exec ( ) ; if ( resp != null ) result = resp . getState ( ) ; } catch ( Exception e ) { // nothing } return result ; }
Gets the state of a container .