Class DockerService


  • public class DockerService
    extends Object
    Docker Service.
    Since:
    5.0.0
    Author:
    Boni Garcia
    • Method Detail

      • isRunningInsideDocker

        public boolean isRunningInsideDocker()
      • getDefaultHost

        public String getDefaultHost()
      • startContainer

        public String startContainer​(DockerContainer dockerContainer)
                              throws com.github.dockerjava.api.exception.DockerException
        Throws:
        com.github.dockerjava.api.exception.DockerException
      • execCommandInContainer

        public String execCommandInContainer​(String containerId,
                                             String... command)
      • getBindPort

        public String getBindPort​(String containerId,
                                  String exposed)
                           throws com.github.dockerjava.api.exception.DockerException
        Throws:
        com.github.dockerjava.api.exception.DockerException
      • pullImageIfNecessary

        public void pullImageIfNecessary​(String cacheKey,
                                         String imageId,
                                         String imageVersion)
                                  throws com.github.dockerjava.api.exception.DockerException
        Throws:
        com.github.dockerjava.api.exception.DockerException
      • stopAndRemoveContainer

        public void stopAndRemoveContainer​(DockerContainer dockerContainer)
      • stopContainer

        public void stopContainer​(String containerId)
                           throws com.github.dockerjava.api.exception.DockerException
        Throws:
        com.github.dockerjava.api.exception.DockerException
      • removeContainer

        public void removeContainer​(String containerId)
                             throws com.github.dockerjava.api.exception.DockerException
        Throws:
        com.github.dockerjava.api.exception.DockerException
      • updateDockerClient

        public void updateDockerClient​(String dockerHost)
      • getMinusIndex

        public int getMinusIndex​(String browserVersion)
      • getDockerImage

        public String getDockerImage​(String browserName,
                                     String browserVersion,
                                     boolean androidEnabled)
      • getDockerImageFormat

        public String getDockerImageFormat​(String browserVersion,
                                           boolean androidEnabled)
      • isBrowserVersionWildCard

        public boolean isBrowserVersionWildCard​(String browserVersion)
      • isBrowserVersionBetaOrDev

        public boolean isBrowserVersionBetaOrDev​(String browserVersion)
      • isBrowserVersionLatestMinus

        public boolean isBrowserVersionLatestMinus​(String browserVersion)
      • getVersionFromImage

        public String getVersionFromImage​(String dockerImage)
      • getDockerClient

        public com.github.dockerjava.api.DockerClient getDockerClient()