public class OfficeFloorDockerUtil extends Object
| Constructor and Description |
|---|
OfficeFloorDockerUtil() |
| Modifier and Type | Method and Description |
|---|---|
static DockerContainerInstance |
ensureContainerAvailable(String containerName,
String imageName,
Function<com.github.dockerjava.api.DockerClient,com.github.dockerjava.api.command.CreateContainerCmd> createContainer)
Ensures the docker container is available.
|
static DockerNetworkInstance |
ensureNetworkAvailable(String networkName)
Ensures the docker network is available.
|
public static DockerNetworkInstance ensureNetworkAvailable(String networkName) throws Exception
networkName - Network name.DockerNetworkInstance of manage docker network.Exception - If fails to ensure docker network available.public static DockerContainerInstance ensureContainerAvailable(String containerName, String imageName, Function<com.github.dockerjava.api.DockerClient,com.github.dockerjava.api.command.CreateContainerCmd> createContainer) throws Exception
containerName - Name of docker container.imageName - Name of the docker image.createContainer - Factory for the CreateContainerCmd if
container not running.DockerContainerInstance to manage running docker container.Exception - If fails to ensure docker container available.Copyright © 2005–2021 OfficeFloor. All rights reserved.