Package no.mnemonic.commons.junit.docker
Class DockerTestUtils
java.lang.Object
no.mnemonic.commons.junit.docker.DockerTestUtils
Utility class for working with Docker environments during unit tests.
-
Method Details
-
getDockerHostVariable
Return the value of the DOCKER_HOST environment variable.- Returns:
- DOCKER_HOST environment variable
-
getDockerHost
Return the hostname extracted from the DOCKER_HOST environment variable.This method supports URLs of the format "tcp://hostname:port". If DOCKER_HOST is a unix:// socket or if DOCKER_HOST is not set, this method will return "localhost".
- Returns:
- Extracted hostname
-