Class Container
java.lang.Object
org.arquillian.cube.docker.impl.client.containerobject.dsl.Container
Base class representing a container.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedContainer(String containerName, CubeContainer cubeContainer, ConnectionMode connectionMode) -
Method Summary
Modifier and TypeMethodDescriptionExecutes given command inside this container.intgetBindPort(int exposedPort) Returns binding port for given exposed port.Returns the ip where this container can be reachable from outside docker host.getLog()Gets current logs of this container.static ContainerBuilderwithContainerName(String containerName)
-
Constructor Details
-
Container
protected Container(String containerName, CubeContainer cubeContainer, ConnectionMode connectionMode)
-
-
Method Details
-
withContainerName
-
getContainerName
-
getCubeContainer
-
getConnectionMode
-
getIpAddress
Returns the ip where this container can be reachable from outside docker host.- Returns:
- Ip.
-
getBindPort
public int getBindPort(int exposedPort) Returns binding port for given exposed port.- Parameters:
exposedPort- to resolve.- Returns:
- Binding port.
-
exec
Executes given command inside this container.- Parameters:
commands- to execute.- Returns:
- Output of the execution.
-
getLog
Gets current logs of this container.- Returns:
- Current logs.
-