public class DockerClient extends Object
docker CLI.| Modifier and Type | Class and Description |
|---|---|
static class |
DockerClient.Builder
Builds a
DockerClient. |
| Modifier and Type | Method and Description |
|---|---|
static DockerClient.Builder |
builder()
Gets a new
DockerClient.Builder for DockerClient with defaults. |
static boolean |
isDefaultDockerInstalled()
Checks if Docker is installed on the user's system and accessible by running the default
docker command. |
static boolean |
isDockerInstalled(Path dockerExecutable)
Checks if Docker is installed on the user's system and accessible by running the given
docker executable. |
String |
load(Blob imageTarballBlob)
Loads an image tarball into the Docker daemon.
|
static DockerClient |
newDefaultClient()
Instantiates with the default
docker executable. |
void |
tag(ImageReference originalImageReference,
ImageReference newImageReference)
Tags the image referenced by
originalImageReference with a new image reference newImageReference. |
public static DockerClient.Builder builder()
DockerClient.Builder for DockerClient with defaults.DockerClient.Builderpublic static DockerClient newDefaultClient()
docker executable.DockerClientpublic static boolean isDefaultDockerInstalled()
docker command.true if Docker is installed on the user's system and accessiblepublic static boolean isDockerInstalled(Path dockerExecutable)
docker executable.dockerExecutable - path to the executable to test runningtrue if Docker is installed on the user's system and accessiblepublic String load(Blob imageTarballBlob) throws InterruptedException, IOException
imageTarballBlob - the built container tarball.docker.InterruptedException - if the 'docker load' process is interrupted.IOException - if streaming the blob to 'docker load' fails.public void tag(ImageReference originalImageReference, ImageReference newImageReference) throws IOException, InterruptedException
originalImageReference with a new image reference newImageReference.originalImageReference - the existing image reference on the Docker daemonnewImageReference - the new image referenceInterruptedException - if the 'docker tag' process is interrupted.IOException - if an I/O exception occurs or docker tag failedCopyright © 2019. All rights reserved.