Class ImageArchive
java.lang.Object
org.springframework.boot.buildpack.platform.docker.type.ImageArchive
- All Implemented Interfaces:
TarArchive
An image archive that can be loaded into Docker.
- Since:
- 2.3.0
- Author:
- Phillip Webb, Scott Frederick
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classUpdate class used to change data when creating an image archive.Nested classes/interfaces inherited from interface TarArchive
TarArchive.Compression -
Field Summary
Fields inherited from interface TarArchive
NORMALIZED_TIME -
Method Summary
Modifier and TypeMethodDescriptionstatic ImageArchiveCreate a newImageArchivebased on an existingImage.static ImageArchivefrom(Image image, IOConsumer<ImageArchive.Update> update) Create a newImageArchivebased on an existingImage.Return the create date of the archive.Return the image config for the archive.@Nullable ImageReferencegetTag()Return the tag of the archive.voidwriteTo(OutputStream outputStream) Write the TAR archive to the given output stream.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TarArchive
getCompression
-
Method Details
-
getImageConfig
Return the image config for the archive.- Returns:
- the image config
-
getCreateDate
-
getTag
-
writeTo
Description copied from interface:TarArchiveWrite the TAR archive to the given output stream.- Specified by:
writeToin interfaceTarArchive- Parameters:
outputStream- the output stream to write to- Throws:
IOException- on IO error
-
from
Create a newImageArchivebased on an existingImage.- Parameters:
image- the image that this archive is based on- Returns:
- the new image archive.
- Throws:
IOException- on IO error
-
from
public static ImageArchive from(Image image, IOConsumer<ImageArchive.Update> update) throws IOException Create a newImageArchivebased on an existingImage.- Parameters:
image- the image that this archive is based onupdate- consumer to apply updates- Returns:
- the new image archive.
- Throws:
IOException- on IO error
-