Package com.spotify.docker.client
Class DefaultDockerClient.CreateProgressHandler
java.lang.Object
com.spotify.docker.client.DefaultDockerClient.CreateProgressHandler
- All Implemented Interfaces:
ProgressHandler
- Enclosing class:
DefaultDockerClient
private static class DefaultDockerClient.CreateProgressHandler
extends Object
implements ProgressHandler
Hack: this
ProgressHandler is meant to capture the image ID (or image digest in Docker
1.10+) of an image being created. Weirdly enough, Docker returns the ID or digest of a newly
created image in the status of a progress message.
The image ID/digest is required to tag the just loaded image since,
also weirdly enough, the pull operation with the fromSrc parameter does not
support the tag parameter. By retrieving the ID/digest, the image can be tagged
with its image name, given its ID/digest.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ProgressHandlerprivate static final intprivate static final intprivate String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Stringvoidprogress(ProgressMessage message) This method will be called for each progress message received from Docker.
-
Field Details
-
EXPECTED_CHARACTER_NUM1
private static final int EXPECTED_CHARACTER_NUM1- See Also:
-
EXPECTED_CHARACTER_NUM2
private static final int EXPECTED_CHARACTER_NUM2- See Also:
-
delegate
-
imageId
-
-
Constructor Details
-
CreateProgressHandler
-
-
Method Details
-
getImageId
-
progress
Description copied from interface:ProgressHandlerThis method will be called for each progress message received from Docker.- Specified by:
progressin interfaceProgressHandler- Parameters:
message- the message to process- Throws:
DockerException- if a server error occurred (500)
-