package current_docker

  1. Overview
  2. Docs
module Image : sig ... end
val pull : ?label: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 schedule

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

val build : ?schedule:Current_cache.Schedule.t -> ?timeout:Duration.t -> ?squash:bool -> ?label:string -> ?dockerfile:Dockerfile.t Current.t -> ?pool:Current.Pool.t -> pull:bool -> 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:Current.Pool.t -> Image.t Current.t -> args:string list -> unit Current.t

run image ~args runs image args with Docker.

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 -> 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.

OCaml

Innovation. Community. Security.