All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.wouterdanes.docker.provider.DockerProvider Maven / Gradle / Ivy

package net.wouterdanes.docker.provider;

import java.util.List;

import net.wouterdanes.docker.provider.model.ContainerStartConfiguration;
import net.wouterdanes.docker.provider.model.ExposedPort;
import net.wouterdanes.docker.provider.model.ImageBuildConfiguration;

/**
 * This interface represents an implementation that provides Docker functionality. Examples are:
 * 
    *
  • Local Docker via Unix Socket
  • *
  • Local Docker via TCP Socket
  • *
  • Remote (Boot2Docker) via TCP Socket
  • *
  • tutum.co
  • *
*/ public interface DockerProvider { /** * Starts a docker container and returns the ID of the started container * @param configuration the configuration parameters * @return the ID of the started container */ String startContainer(ContainerStartConfiguration configuration); /** * Stops a docker container * @param containerId the Id of the container to stop */ void stopContainer(String containerId); /** * Delete a docker container * @param containerId the Id of the container to delete */ void deleteContainer(String containerId); /** * Returns a list of ports exposed by the container, including information on how to reach them * @param containerId the Id of the container * @return {@link List} of {@link net.wouterdanes.docker.provider.model.ExposedPort}s */ List getExposedPorts(String containerId); /** * Builds a new Docker Image based on the passed configuration and returns the id of the newly created image. * @param image the image configuration to use * @return the id of the new Docker Image */ String buildImage(ImageBuildConfiguration image); /** * Removes an image from docker * @param imageId the Id of the images to remove */ void removeImage(String imageId); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy