Class DockerContainerInstance

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class DockerContainerInstance
    extends java.lang.Object
    implements java.lang.AutoCloseable
    Instance of running Docker.
    Author:
    Daniel Sagenschneider
    • Constructor Summary

      Constructors 
      Constructor Description
      DockerContainerInstance​(java.lang.String containerName, java.lang.String imageName, java.lang.String containerId, com.github.dockerjava.api.DockerClient docker)
      Instantiate.
    • Constructor Detail

      • DockerContainerInstance

        public DockerContainerInstance​(java.lang.String containerName,
                                       java.lang.String imageName,
                                       java.lang.String containerId,
                                       com.github.dockerjava.api.DockerClient docker)
        Instantiate.
        Parameters:
        containerId - Identifier for the container of the docker instance.
        docker - DockerClient.
    • Method Detail

      • connectToDockerInstance

        public <R,​T extends java.lang.Throwable> R connectToDockerInstance​(DockerConnectOperation<R,​T> connect)
                                                                          throws T extends java.lang.Throwable
        Undertakes connection to the Docker container instance.
        Type Parameters:
        R - Result of connection.
        T - Possible failure in connection.
        Parameters:
        connect - DockerConnectOperation.
        Returns:
        Result of connection.
        Throws:
        T - Possible failure in connection.
        T extends java.lang.Throwable
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable