Module Docker.Image

type id = string
type t = {
id : id;
created : float;
size : int;
virtual_size : int;
tags : string list;
}
val list : ?addr:Unix.sockaddr -> ?all:bool -> unit -> t list

list () return the list of images.

  • parameter all

    return all images. Default: false.

type source =
| Image of {
name : string;
repo : string;
tag : string;
}
| Src of string
| Stdin of {
len : int;
write : Unix.file_descr -> int -> unit;
}

See create.

val create : ?addr:Unix.sockaddr -> ?platform:string -> source -> unit

create from creates an image by either pulling it from a registry or importing it.

  • `Image img provides the name img.name of the image. The name may include a tag or digest img.tag. If img.tag is empty when pulling an image, it causes all tags for the given image to be pulled.
  • `Src url provides the url from which the image can be retrieved.
  • `Stdin img provides the image as its length img.len and a function img.write fd len that will write the image on fd.
  • parameter repo

    Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image.

  • parameter tag

    Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled.

  • parameter platform

    Platform in the format os[/arch[/variant]]. Default: "".

val from_image : ?repo:string -> ?tag:string -> string -> source

from_image name convenience function that returns an Image source.