code: public static Container findContainerByIdOrByName( String name, DockerClient dockerClient ) {
  
  		Container result = null;
  		List<Container> containers = dockerClient.listContainersCmd().withShowAll( true ).exec();
  		for( Container container : containers ) {
  			List<String> names = Arrays.asList( container.getNames());
  
  			// Docker containers are prefixed with '/'.
  			// At least, those we created, since their parent is the Docker daemon.
  			if( container.getId().equals( name )
  					|| names.contains( "/" + name )) {
  				result = container;
  				break;
  			}
  		}
  
  		return result;
  	}
docs: Finds a container by ID or by name.
  @param name the container ID or name (not null)
  @param dockerClient a Docker client
  @return a container, or null if none was found