Buggy code:
public class DockerNeedProvider implements NeedProvider < DockerClientConfigBuilder > { private static final Logger LOGGER = LoggerFactory . getLogger ( "docker" ) ; private DockerClientConfig clientConfig ; private DockerClient client ; private CreateContainerResponse containerResponse ; @ Override public DockerClientConfigBuilder configuration ( NeedDescriptor descriptor ) { } @ Override public void init ( NeedDescriptor descriptor , DockerClientConfigBuilder context ) { try { <START_BUG> clientConfig = context . withUri ( "http:////localhost:2375" ) . build ( ) ; <END_BUG> client = DockerClientBuilder . getInstance ( clientConfig ) . build ( ) ; Set < DockerContainer > dockerContainers = descriptor . getAnnotations ( DockerContainer . class ) ; for ( DockerContainer dockerContainer : dockerContainers ) { CountDownLatch latch = new CountDownLatch ( 1 ) ; if ( dockerContainer . pull ( ) ) { PullCallback callback = new PullCallback ( dockerContainer , latch , DockerNeedProvider . LOGGER ) ; client . pullImageCmd ( dockerContainer . value ( ) ) . withTag ( dockerContainer . tag ( ) ) . exec ( callback ) ; } else { latch . countDown ( ) ; } latch . await ( ) ; String image = ( ( dockerContainer . value ( ) ) + ":" ) + ( dockerContainer . tag ( ) ) ; CreateContainerCmd cmd = client . createContainerCmd ( image ) ; cmd . withPublishAllPorts ( true ) ; if ( ! ( dockerContainer . cmd ( ) . isEmpty ( ) ) ) { cmd . withCmd ( dockerContainer . cmd ( ) ) ; } if ( ! ( dockerContainer . name ( ) . isEmpty ( ) ) ) { cmd . withName ( dockerContainer . name ( ) ) ; } containerResponse = cmd . exec ( ) ; client . startContainerCmd ( containerResponse . getId ( ) ) . exec ( ) ; if ( dockerContainer . await ( ) ) { RetryPolicy retryPolicy = new RetryPolicy ( ) . retryOn ( DockerContainerException . class ) . withBackoff ( dockerContainer . delay ( ) , dockerContainer . maxDelay ( ) , dockerContainer . unit ( ) ) . withMaxRetries ( dockerContainer . maxRetries ( ) ) . withMaxDuration ( dockerContainer . maxDuration ( ) , dockerContainer . unit ( ) ) ; InspectContainerResponse inspectResponse = client . inspectContainerCmd ( containerResponse . getId ( ) ) . exec ( ) ; String address = inspectResponse . getNetworkSettings ( ) . getIpAddress ( ) ; List < Integer > ports = inspectResponse . getNetworkSettings ( ) . getPorts ( ) . getBindings ( ) . entrySet ( ) . parallelStream ( ) . map ( ( p ) -> p . getKey ( ) . getPort ( ) ) . collect ( Collectors . toList ( ) ) ; ContainerInstance instance = new ContainerInstance ( client , inspectResponse ) ; descriptor . getServiceLocator ( ) . addConstant ( instance . getHostname ( ) , instance ) ; ports . parallelStream ( ) . forEach ( ( p ) -> Recurrent . run ( ( ) -> { LOGGER . info ( "Awaiting<seq2seq4repair_space>port<seq2seq4repair_space>'{}'<seq2seq4repair_space>to<seq2seq4repair_space>become<seq2seq4repair_space>reachable" , p ) ; try ( Socket socket = new Socket ( address , p ) ) { if ( ! ( socket . isConnected ( ) ) ) { throw new DockerContainerException ( ) ; } } catch ( e ) { throw new < e > DockerContainerException ( ) ; } } , retryPolicy ) ) ; } } } catch ( Exception e ) { throw new IllegalStateException ( e ) ; } } @ Override public void destroy ( NeedDescriptor descriptor , DockerClientConfigBuilder context ) { } }

Fix:
clientConfig = context . withUri ( "http:////localhost:4243" ) . build ( ) ;