Class DockerHandler

java.lang.Object
org.hortonmachine.modules.docker.DockerHandler

public class DockerHandler extends Object
  • Field Details

  • Constructor Details

    • DockerHandler

      public DockerHandler()
  • Method Details

    • hasImage

      public String hasImage(String imageName)
      Checks if a certain image is available.
      Parameters:
      imageName - the image to check.
      Returns:
      the id of the image or null.
    • removeImage

      public void removeImage(String imageId)
    • pullImage

      public void pullImage(String imageName, String tag, org.hortonmachine.gears.libs.monitor.IHMProgressMonitor pm) throws Exception
      Throws:
      Exception
    • initDocker

      public String initDocker()
      Initialize the docker client.
      Returns:
      an error message if there were issues, null if everyhtin gwent smooth.
    • startContainer

      public void startContainer(String imageName, String volumePath) throws Exception
      Throws:
      Exception
    • execCommand

      public void execCommand(String command) throws Exception
      Throws:
      Exception
    • closeClient

      public void closeClient() throws Exception
      Throws:
      Exception