package current_docker

  1. Overview
  2. Docs

Building Docker commands. This is useful for creating custom pipeline stages.

val docker : string list -> t

docker args is a command to run docker, with the "--context" argument added (if necessary). e.g. docker ["run"; image]

val with_container : kill_on_cancel:bool -> job:Current.Job.t -> t -> (string -> 'a Current.or_error Lwt.t) -> 'a Current.or_error Lwt.t

with_container ~kill_on_cancel ~job t fn runs t to create a new container (the output is the container ID), then calls fn id. When fn returns, it removes the container (killing it first if necessary). If fn raises an exception, it catches it and turns it into an error return.

  • parameter kill_on_cancel

    "docker kill" the container if the the job is cancelled.

val pp : t Fmt.t
OCaml

Innovation. Community. Security.