package current_docker

  1. Overview
  2. Docs

The docker engine running on Host.

Parameters

module Host : S.HOST

Signature

module Image : sig ... end
val docker_context : string option
val pull : ?label:string -> ?arch:string -> schedule:Current_cache.Schedule.t -> string -> Image.t Current.t

pull ~schedule tag ensures that the latest version of tag is cached locally, downloading it if not.

  • parameter arch

    Select a specific architecture from a multi-arch manifest.

  • parameter schedule

    Controls how often we check for updates. If the schedule has no valid_for limit then we will only ever pull once.

val peek : ?label:string -> arch:string -> schedule:Current_cache.Schedule.t -> string -> S.repo_id Current.t

peek ~schedule ~arch tag gets the latest version of tag without actually pulling it.

  • parameter arch

    Select a specific architecture from a multi-arch manifest.

  • parameter schedule

    Controls how often we check for updates. If the schedule has no valid_for limit then we will only ever check once.

val build : ?schedule:Current_cache.Schedule.t -> ?timeout:Duration.t -> ?squash:bool -> ?label:string -> ?dockerfile:[ `File of Fpath.t | `Contents of Dockerfile.t ] Current.t -> ?pool:unit Current.Pool.t -> ?build_args:string list -> pull:bool -> S.source -> Image.t Current.t

build ~pull src builds a Docker image from source.

  • parameter timeout

    If set, abort builds that take longer than this.

  • parameter squash

    If set to true, pass "--squash" to "docker build".

  • parameter dockerfile

    If present, this is used as the contents of the Dockerfile.

  • parameter pull

    If true, always check for updates and pull the latest version.

  • parameter pool

    Rate limit builds by requiring a resource from the pool.

val run : ?label:string -> ?pool:unit Current.Pool.t -> ?run_args:string list -> Image.t Current.t -> args:string list -> unit Current.t

run image ~args runs image args with Docker.

  • parameter run_args

    List of additional arguments to pass to the "docker run" subcommand.

val pread : ?label:string -> ?pool:unit Current.Pool.t -> ?run_args:string list -> Image.t Current.t -> args:string list -> string Current.t

pread image ~args runs image args with Docker the same way than run does but returns its stdout as a string.

val tag : tag:string -> Image.t Current.t -> unit Current.t

tag image ~tag does "docker tag image tag"

val push : ?auth:(string * string) -> tag:string -> Image.t Current.t -> S.repo_id Current.t

push image ~tag does "docker tag image tag && docker push tag".

  • parameter auth

    If give, do a "docker login" using this username/password pair before pushing.

val service : name:string -> image:Image.t Current.t -> unit -> unit Current.t

service ~name ~image () keeps a Docker SwarmKit service up-to-date.

val compose : name:string -> contents:string Current.t -> unit -> unit Current.t

service ~name ~image ~contents () keeps a Docker Compose deployment up-to-date. contents contains the full Compose Yaml file.

OCaml

Innovation. Community. Security.