类 ImageArchive
java.lang.Object
cn.taketoday.buildpack.platform.docker.type.ImageArchive
- 所有已实现的接口:
TarArchive
An image archive that can be loaded into Docker.
- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Scott Frederick
- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明static final classUpdate class used to change data when creating an image archive. -
字段概要
字段修饰符和类型字段说明private final Instantprivate static final DateTimeFormatterprivate static final Stringprivate final ImageConfigprivate static final IOConsumer<ImageArchive.Update>private final ObjectMapperprivate final Stringprivate final ImageReferenceprivate static final Instant从接口继承的字段 cn.taketoday.buildpack.platform.io.TarArchive
NORMALIZED_TIME -
构造器概要
构造器构造器说明ImageArchive(ObjectMapper objectMapper, ImageConfig imageConfig, Instant createDate, ImageReference tag, String os, List<LayerId> existingLayers, List<Layer> newLayers) -
方法概要
修饰符和类型方法说明private ObjectNodecreateConfig(List<LayerId> writtenLayers) private JsonNodecreateHistory(List<LayerId> writtenLayers) private ArrayNodecreateManifest(String config, List<LayerId> writtenLayers) private JsonNodecreateRootFs(List<LayerId> writtenLayers) static 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.private StringReturn the image config for the archive.private ArrayNodegetManifestLayers(List<LayerId> writtenLayers) getTag()Return the tag of the archive.private voidprivate StringwriteConfig(Layout writer, List<LayerId> writtenLayers) private voidwriteEmptyLayer(Layout writer, String name) private LayerIdwriteLayer(Layout writer, Layer layer) writeLayers(Layout writer) private voidwriteManifest(Layout writer, String config, List<LayerId> writtenLayers) voidwriteTo(OutputStream outputStream) Write the TAR archive to the given output stream.
-
字段详细资料
-
WINDOWS_EPOCH_PLUS_SECOND
-
DATE_FORMATTER
-
EMPTY_LAYER_NAME_PREFIX
- 另请参阅:
-
NO_UPDATES
-
objectMapper
-
imageConfig
-
createDate
-
tag
-
os
-
existingLayers
-
newLayers
-
-
构造器详细资料
-
ImageArchive
ImageArchive(ObjectMapper objectMapper, ImageConfig imageConfig, Instant createDate, ImageReference tag, String os, List<LayerId> existingLayers, List<Layer> newLayers)
-
-
方法详细资料
-
getImageConfig
Return the image config for the archive.- 返回:
- the image config
-
getCreateDate
Return the create date of the archive.- 返回:
- the create date
-
getTag
Return the tag of the archive.- 返回:
- the tag
-
writeTo
从接口复制的说明:TarArchiveWrite the TAR archive to the given output stream.- 指定者:
writeTo在接口中TarArchive- 参数:
outputStream- the output stream to write to- 抛出:
IOException- on IO error
-
write
- 抛出:
IOException
-
writeLayers
- 抛出:
IOException
-
writeEmptyLayer
- 抛出:
IOException
-
writeLayer
- 抛出:
IOException
-
writeConfig
- 抛出:
IOException
-
createConfig
-
getCreatedDate
-
createHistory
-
createRootFs
-
writeManifest
private void writeManifest(Layout writer, String config, List<LayerId> writtenLayers) throws IOException - 抛出:
IOException
-
createManifest
-
getManifestLayers
-
from
Create a newImageArchivebased on an existingImage.- 参数:
image- the image that this archive is based on- 返回:
- the new image archive.
- 抛出:
IOException- on IO error
-
from
public static ImageArchive from(Image image, IOConsumer<ImageArchive.Update> update) throws IOException Create a newImageArchivebased on an existingImage.- 参数:
image- the image that this archive is based onupdate- consumer to apply updates- 返回:
- the new image archive.
- 抛出:
IOException- on IO error
-