public abstract class RemoteApiBasedDockerProvider extends Object implements DockerProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
DOCKER_HOST_PROPERTY |
static String |
DOCKER_HOST_SYSTEM_ENV |
static String |
DOCKER_PORT_PROPERTY |
static String |
TCP_PROTOCOL |
| Modifier | Constructor and Description |
|---|---|
|
RemoteApiBasedDockerProvider() |
protected |
RemoteApiBasedDockerProvider(String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
String |
buildImage(ImageBuildConfiguration image)
Builds a new Docker Image based on the passed configuration and returns the id of the newly created image.
|
String |
commitContainer(ContainerCommitConfiguration configuration)
Create a new image from a container's changes
|
void |
deleteContainer(String containerId)
Delete a docker container
|
protected ContainersService |
getContainersService() |
protected String |
getHost() |
protected ImagesService |
getImagesService() |
String |
getLogs(String containerId)
Returns the logs of the specified container
|
protected int |
getPort() |
void |
pushImage(String nameAndTag)
Pushes an image from docker to a registry.
|
protected void |
register(BaseService... servicesToBeRegistered) |
void |
removeImage(String imageId)
Removes an image from docker
|
void |
setCredentials(Credentials credentials)
Sets (or un-sets) the credentials to be used when communicating with the Docker host.
|
void |
setLogger(org.apache.maven.plugin.logging.Log logger)
Sets the logger to use.
|
void |
setRemoteRepositories(List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
Sets the remoteRepositories to use.
|
void |
setRepositorySystem(org.eclipse.aether.RepositorySystem repositorySystem)
Sets the repositorySystem to use.
|
void |
setRepositorySystemSession(org.eclipse.aether.RepositorySystemSession repositorySystemSession)
Sets the repositorySystemSession to use.
|
protected ContainerInspectionResult |
startContainer(ContainerStartConfiguration configuration,
ContainerStartRequest startRequest) |
void |
stopContainer(String containerId)
Stops a docker container
|
void |
tagImage(String imageId,
String nameAndTag)
Associates an image with a new repo/tag.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetExposedPorts, startContainerpublic static final String DOCKER_HOST_SYSTEM_ENV
public static final String DOCKER_HOST_PROPERTY
public static final String DOCKER_PORT_PROPERTY
public static final String TCP_PROTOCOL
public RemoteApiBasedDockerProvider()
protected RemoteApiBasedDockerProvider(String host, int port)
public void setCredentials(Credentials credentials)
DockerProvidersetCredentials in interface DockerProvidercredentials - the user credentials, may be nullpublic void stopContainer(String containerId)
DockerProviderstopContainer in interface DockerProvidercontainerId - the Id of the container to stoppublic void deleteContainer(String containerId)
DockerProviderdeleteContainer in interface DockerProvidercontainerId - the Id of the container to deletepublic String buildImage(ImageBuildConfiguration image)
DockerProviderbuildImage in interface DockerProviderimage - the image configuration to usepublic String commitContainer(ContainerCommitConfiguration configuration)
DockerProvidercommitContainer in interface DockerProviderconfiguration - the configuration parameterspublic void removeImage(String imageId)
DockerProviderremoveImage in interface DockerProviderimageId - the Id of the images to removepublic void pushImage(String nameAndTag)
DockerProviderpushImage in interface DockerProvidernameAndTag - optional name and tag to be associated with pushed imagepublic void tagImage(String imageId, String nameAndTag)
DockerProvidertagImage in interface DockerProviderimageId - the Id of the image to tagnameAndTag - the repo/tag to assignpublic String getLogs(String containerId)
DockerProvidergetLogs in interface DockerProvidercontainerId - the Id of the containerpublic void setLogger(org.apache.maven.plugin.logging.Log logger)
DockerProvidersetLogger in interface DockerProviderlogger - the Maven logger to usepublic void setRepositorySystem(org.eclipse.aether.RepositorySystem repositorySystem)
DockerProvidersetRepositorySystem in interface DockerProviderrepositorySystem - the Maven repositorySystem to usepublic void setRepositorySystemSession(org.eclipse.aether.RepositorySystemSession repositorySystemSession)
DockerProvidersetRepositorySystemSession in interface DockerProviderrepositorySystemSession - the Maven repositorySystemSession to usepublic void setRemoteRepositories(List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
DockerProvidersetRemoteRepositories in interface DockerProviderremoteRepositories - the Maven remoteRepositories to useprotected ContainerInspectionResult startContainer(ContainerStartConfiguration configuration, ContainerStartRequest startRequest)
protected ContainersService getContainersService()
protected ImagesService getImagesService()
protected void register(BaseService... servicesToBeRegistered)
protected String getHost()
protected int getPort()
Copyright © 2016. All Rights Reserved.