Struct podman_api::api::Images [−][src]
pub struct Images<'podman> { /* fields omitted */ }
Expand description
Handle for Podman Images.
Implementations
Build an image from the given Dockerfile(s)
Examples:
let podman = Podman::unix("/run/user/1000/podman/podman.sock");
if let Err(e) = podman
.images()
.create(
&ImageBuildOpts::builder()
.remote("http://some.url.to/Dockerfile")
.tag("myimage:1.0.0")
.build(),
)
.await
{
eprintln!("{}", e);
}
Returns a list of images.
Examples:
let podman = Podman::unix("/run/user/1000/podman/podman.sock");
for image in podman
.images()
.list(
&ImageListOpts::builder()
.all(true)
.filter([ImageListFilter::Dangling(true)])
.build(),
)
.await
.unwrap()
{
println!("{:?}", image);
}
Pull one or more images from a container registry.
Examples:
let podman = Podman::unix("/run/user/1000/podman/podman.sock");
if let Err(e) = podman
.images()
.pull(
&PullOpts::builder()
.reference("rockylinux/rockylinux:8")
.build(),
)
.await
{
eprintln!("{}", e);
}
Load an image (oci-archive or docker-archive) stream.
Examples:
let podman = Podman::unix("/run/user/1000/podman/podman.sock");
let image = std::fs::read("image_archive")?;
match podman.images().load(&image).await {
Ok(info) => println!("{:?}", info),
Err(e) => eprintln!("{}", e),
}
pub async fn import(
&self,
opts: &ImageImportOpts,
image: impl AsRef<[u8]>
) -> Result<LibpodImagesPullReport>
pub async fn import(
&self,
opts: &ImageImportOpts,
image: impl AsRef<[u8]>
) -> Result<LibpodImagesPullReport>
Import a previously exported tarball as an image.
Examples:
let podman = Podman::unix("/run/user/1000/podman/podman.sock");
if let Err(e) = podman
.images()
.pull(
&PullOpts::builder()
.reference("rockylinux/rockylinux:8")
.build(),
)
.await
{
eprintln!("{}", e);
}
Trait Implementations
Auto Trait Implementations
impl<'podman> !RefUnwindSafe for Images<'podman>
impl<'podman> !UnwindSafe for Images<'podman>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more