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
Modifier and TypeClassDescriptionstatic final class
Update 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 ImageArchive
Create a newImageArchive
based on an existingImage
.static ImageArchive
from
(Image image, IOConsumer<ImageArchive.Update> update) Create a newImageArchive
based on an existingImage
.Return the create data of the archive.Return the image config for the archive.getTag()
Return the tag of the archive.void
writeTo
(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 data of the archive.- Returns:
- the create date
-
getTag
Return the tag of the archive.- Returns:
- the tag
-
writeTo
Description copied from interface:TarArchive
Write the TAR archive to the given output stream.- Specified by:
writeTo
in interfaceTarArchive
- Parameters:
outputStream
- the output stream to write to- Throws:
IOException
- on IO error
-
from
Create a newImageArchive
based 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 newImageArchive
based 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
-