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
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classUpdate class used to change data when creating an image archive. -
Field Summary
Fields inherited from interface org.springframework.boot.buildpack.platform.io.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.getTag()Return the tag of the archive.voidwriteTo(OutputStream outputStream) Write the TAR archive to the given output stream.
-
Method Details
-
getImageConfig
Return the image config for the archive.- Returns:
- the image config
-
getCreateDate
Return the create date of the archive.- Returns:
- the create date
-
getTag
Return the tag of the archive.- Returns:
- the tag
-
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
-