public interface DockerContainerService
| Modifier and Type | Method and Description |
|---|---|
@Nullable Integer |
getHostPort(@NotNull ProcessContext processContext,
@NotNull Path dockerPath,
@NotNull String containerName,
@NotNull Integer containerPort,
@NotNull Path workingDirectory,
@NotNull Map<String,String> environment)
Gets the host port mapped to the given container port.
|
boolean |
isRunning(@NotNull ProcessContext processContext,
@NotNull Path dockerPath,
@NotNull String containerName,
@NotNull Path workingDirectory,
@NotNull Map<String,String> environment)
Checks if a container with the given name is running.
|
void |
remove(@NotNull ProcessContext processContext,
@NotNull Path dockerPath,
@NotNull String containerName,
@NotNull Path workingDirectory,
@NotNull Map<String,String> environment)
Removes the container with the given name.
|
void |
run(@NotNull ProcessContext processContext,
@NotNull Path dockerPath,
@NotNull String imageName,
@NotNull RunConfig runConfig,
@NotNull Path workingDirectory,
@NotNull Map<String,String> environment)
Start a Docker container for the image provided.
|
void run(@NotNull
@NotNull ProcessContext processContext,
@NotNull
@NotNull Path dockerPath,
@NotNull
@NotNull String imageName,
@NotNull
@NotNull RunConfig runConfig,
@NotNull
@NotNull Path workingDirectory,
@NotNull
@NotNull Map<String,String> environment)
throws DockerException
imageName - the image to run.runConfig - The run configuration describing which parameters
to include for the Docker run command.DockerExceptionboolean isRunning(@NotNull
@NotNull ProcessContext processContext,
@NotNull
@NotNull Path dockerPath,
@NotNull
@NotNull String containerName,
@NotNull
@NotNull Path workingDirectory,
@NotNull
@NotNull Map<String,String> environment)
throws DockerException
containerName - the name of the container to check.DockerException@Nullable @Nullable Integer getHostPort(@NotNull @NotNull ProcessContext processContext, @NotNull @NotNull Path dockerPath, @NotNull @NotNull String containerName, @NotNull @NotNull Integer containerPort, @NotNull @NotNull Path workingDirectory, @NotNull @NotNull Map<String,String> environment) throws DockerException
containerName - the name of the container to check.containerPort - The container port.DockerExceptionvoid remove(@NotNull
@NotNull ProcessContext processContext,
@NotNull
@NotNull Path dockerPath,
@NotNull
@NotNull String containerName,
@NotNull
@NotNull Path workingDirectory,
@NotNull
@NotNull Map<String,String> environment)
throws DockerException
containerName - the name of the container to remove.DockerExceptionCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.