类 DockerApi.ImageApi
java.lang.Object
cn.taketoday.buildpack.platform.docker.DockerApi.ImageApi
- 封闭类:
- DockerApi
Docker API for image operations.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private PathvoidexportLayerFiles(ImageReference reference, IOBiConsumer<String, Path> exports) Export the layers of an image as paths to layer tar files.voidexportLayers(ImageReference reference, IOBiConsumer<String, TarArchive> exports) Export the layers of an image asTarArchives.private ImageArchiveManifestgetManifest(ImageReference reference, Path exportFile) inspect(ImageReference reference) Inspect an image.voidload(ImageArchive archive, UpdateListener<LoadImageUpdateEvent> listener) Load anImageArchiveinto Docker.private booleanmanifestContainsLayerEntry(ImageArchiveManifest manifest, String layerId) pull(ImageReference reference, UpdateListener<PullImageUpdateEvent> listener) Pull an image from a registry.pull(ImageReference reference, UpdateListener<PullImageUpdateEvent> listener, String registryAuth) Pull an image from a registry.voidpush(ImageReference reference, UpdateListener<PushImageUpdateEvent> listener, String registryAuth) Push an image to a registry.private ImageArchiveManifestreadManifest(org.apache.commons.compress.archivers.tar.TarArchiveInputStream tar) voidremove(ImageReference reference, boolean force) Remove a specific image.voidtag(ImageReference sourceReference, ImageReference targetReference)
-
构造器详细资料
-
ImageApi
ImageApi()
-
-
方法详细资料
-
pull
public Image pull(ImageReference reference, UpdateListener<PullImageUpdateEvent> listener) throws IOException Pull an image from a registry.- 参数:
reference- the image reference to pulllistener- a pull listener to receive update events- 返回:
- the
pulled imageinstance - 抛出:
IOException- on IO error
-
pull
public Image pull(ImageReference reference, UpdateListener<PullImageUpdateEvent> listener, String registryAuth) throws IOException Pull an image from a registry.- 参数:
reference- the image reference to pulllistener- a pull listener to receive update eventsregistryAuth- registry authentication credentials- 返回:
- the
pulled imageinstance - 抛出:
IOException- on IO error
-
push
public void push(ImageReference reference, UpdateListener<PushImageUpdateEvent> listener, String registryAuth) throws IOException Push an image to a registry.- 参数:
reference- the image reference to pushlistener- a push listener to receive update eventsregistryAuth- registry authentication credentials- 抛出:
IOException- on IO error
-
load
public void load(ImageArchive archive, UpdateListener<LoadImageUpdateEvent> listener) throws IOException Load anImageArchiveinto Docker.- 参数:
archive- the archive to loadlistener- a pull listener to receive update events- 抛出:
IOException- on IO error
-
exportLayers
public void exportLayers(ImageReference reference, IOBiConsumer<String, TarArchive> exports) throws IOExceptionExport the layers of an image asTarArchives.- 参数:
reference- the reference to exportexports- a consumer to receive the layers (contents can only be accessed during the callback)- 抛出:
IOException- on IO error
-
exportLayerFiles
public void exportLayerFiles(ImageReference reference, IOBiConsumer<String, Path> exports) throws IOExceptionExport the layers of an image as paths to layer tar files.- 参数:
reference- the reference to exportexports- a consumer to receive the layer tar file paths (file can only be accessed during the callback)- 抛出:
IOException- on IO error
-
remove
Remove a specific image.- 参数:
reference- the reference the removeforce- if removal should be forced- 抛出:
IOException- on IO error
-
inspect
Inspect an image.- 参数:
reference- the image reference- 返回:
- the image from the local repository
- 抛出:
IOException- on IO error
-
tag
- 抛出:
IOException
-
getManifest
private ImageArchiveManifest getManifest(ImageReference reference, Path exportFile) throws IOException - 抛出:
IOException
-
readManifest
private ImageArchiveManifest readManifest(org.apache.commons.compress.archivers.tar.TarArchiveInputStream tar) throws IOException - 抛出:
IOException
-
copyToTemp
- 抛出:
IOException
-
manifestContainsLayerEntry
-