public interface DockerClient
Modifier and Type | Method and Description |
---|---|
ImageDetails |
inspect(ImageReference imageReference)
Gets the size, image ID, and diff IDs of an image in the Docker daemon.
|
java.lang.String |
load(ImageTarball imageTarball,
java.util.function.Consumer<java.lang.Long> writtenByteCountListener)
Loads an image tarball into the Docker daemon.
|
void |
save(ImageReference imageReference,
java.nio.file.Path outputPath,
java.util.function.Consumer<java.lang.Long> writtenByteCountListener)
Saves an image tarball from the Docker daemon.
|
boolean |
supported(java.util.Map<java.lang.String,java.lang.String> parameters)
Validate if the DockerClient is supported.
|
boolean supported(java.util.Map<java.lang.String,java.lang.String> parameters)
parameters
- to be used by the docker clientjava.lang.String load(ImageTarball imageTarball, java.util.function.Consumer<java.lang.Long> writtenByteCountListener) throws java.lang.InterruptedException, java.io.IOException
imageTarball
- the built container tarballwrittenByteCountListener
- callback to call when bytes are loadeddocker
java.lang.InterruptedException
- if the 'docker load' process is interruptedjava.io.IOException
- if streaming the blob to 'docker load' failsvoid save(ImageReference imageReference, java.nio.file.Path outputPath, java.util.function.Consumer<java.lang.Long> writtenByteCountListener) throws java.lang.InterruptedException, java.io.IOException
imageReference
- the image to saveoutputPath
- the destination path to save the output tarballwrittenByteCountListener
- callback to call when bytes are savedjava.lang.InterruptedException
- if the 'docker save' process is interruptedjava.io.IOException
- if creating the tarball failsImageDetails inspect(ImageReference imageReference) throws java.io.IOException, java.lang.InterruptedException
imageReference
- the image to inspectjava.io.IOException
- if an I/O exception occurs or docker inspect
failedjava.lang.InterruptedException
- if the docker inspect
process was interrupted