package docker-api

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type id = string
type t = {
  1. id : id;
  2. created : float;
  3. size : int;
  4. virtual_size : int;
  5. 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 =
  1. | Image of {
    1. name : string;
    2. repo : string;
    3. tag : string;
    }
  2. | Src of string
  3. | Stdin of {
    1. len : int;
    2. 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.