pub struct Images { /* private fields */ }
Expand description
Interface for Docker Images.Image>
Implementations§
Source§impl Images
impl Images
Sourcepub async fn list(&self, opts: &ImageListOpts) -> Result<Vec<ImageSummary>>
pub async fn list(&self, opts: &ImageListOpts) -> Result<Vec<ImageSummary>>
List available Images.
Sourcepub async fn prune(
&self,
opts: &ImagePruneOpts,
) -> Result<ImagePrune200Response>
pub async fn prune( &self, opts: &ImagePruneOpts, ) -> Result<ImagePrune200Response>
Delete stopped/unused Images.
Sourcepub fn build<'docker>(
&'docker self,
opts: &ImageBuildOpts,
) -> impl Stream<Item = Result<ImageBuildChunk>> + Unpin + 'docker
pub fn build<'docker>( &'docker self, opts: &ImageBuildOpts, ) -> impl Stream<Item = Result<ImageBuildChunk>> + Unpin + 'docker
Builds a new image by reading a Dockerfile in a target directory. If speed is
important consider using Image::build_par
that utilizes
parallel compression on big directories, to use it enable par-compression
feature.
Sourcepub fn build_par<'docker>(
&'docker self,
opts: &ImageBuildOpts,
) -> impl Stream<Item = Result<ImageBuildChunk>> + Unpin + 'docker
pub fn build_par<'docker>( &'docker self, opts: &ImageBuildOpts, ) -> impl Stream<Item = Result<ImageBuildChunk>> + Unpin + 'docker
Builds a new image by reading a Dockerfile in a target directory. Uses parallel
compression algorithm to speed up the execution. For a single-threaded version check
Image::build
.
Sourcepub async fn search<T>(&self, term: T) -> Result<ImageSearch200Response>
pub async fn search<T>(&self, term: T) -> Result<ImageSearch200Response>
Search for docker images by term.
Sourcepub fn pull<'docker>(
&'docker self,
opts: &PullOpts,
) -> impl Stream<Item = Result<ImageBuildChunk>> + Unpin + 'docker
pub fn pull<'docker>( &'docker self, opts: &PullOpts, ) -> impl Stream<Item = Result<ImageBuildChunk>> + Unpin + 'docker
Pull and create a new docker images from an existing image.
Sourcepub fn export<'docker>(
&'docker self,
names: Vec<&str>,
) -> impl Stream<Item = Result<Vec<u8>>> + 'docker
pub fn export<'docker>( &'docker self, names: Vec<&str>, ) -> impl Stream<Item = Result<Vec<u8>>> + 'docker
Exports a collection of named images, either by name, name:tag, or image id, into a tarball.
Sourcepub fn import<'docker, R>(
&'docker self,
tarball: R,
) -> impl Stream<Item = Result<ImageBuildChunk>> + Unpin + 'docker
pub fn import<'docker, R>( &'docker self, tarball: R, ) -> impl Stream<Item = Result<ImageBuildChunk>> + Unpin + 'docker
Imports an image or set of images from a given tarball source. Source can be uncompressed on compressed via gzip, bzip2 or xz.
Sourcepub async fn push(
&self,
name: impl Into<Id>,
opts: &ImagePushOpts,
) -> Result<()>
pub async fn push( &self, name: impl Into<Id>, opts: &ImagePushOpts, ) -> Result<()>
Push an image to registry.
Sourcepub async fn clear_cache(
&self,
opts: &ClearCacheOpts,
) -> Result<BuildPrune200Response>
pub async fn clear_cache( &self, opts: &ClearCacheOpts, ) -> Result<BuildPrune200Response>
Clear image build cache.