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