package obuilder

  1. Overview
  2. Docs

Sandbox builds using Docker.

include S.SANDBOX
type t
val run : cancelled:unit Lwt.t -> ?stdin:Obuilder__.Os.unix_fd -> log:Build_log.t -> t -> Config.t -> string -> (unit, [ `Cancelled | `Msg of string ]) Lwt_result.t

run ~cancelled t config dir runs the operation config in a sandbox with root filesystem dir.

  • parameter cancelled

    Resolving this kills the process (and returns `Cancelled).

  • parameter stdin

    Passed to child as its standard input.

  • parameter log

    Used for child's stdout and stderr.

val finished : unit -> unit Lwt.t
val teardown : log:Build_log.t -> commit:bool -> S.id -> unit Lwt.t
val manifest_from_build : t -> base:S.id -> exclude:string list -> string list -> string -> Obuilder_spec.user -> (Obuilder__.Manifest.t list, [> `Msg of string ]) Lwt_result.t
val copy_from_context : t -> cancelled:unit Lwt.t -> log:Build_log.t -> [< `Copy_item of Obuilder__.Manifest.t * string | `Copy_items of Obuilder__.Manifest.t list * string ] -> user:Obuilder_spec.user -> src_dir:string -> ?dst_dir:string -> string -> (unit, [ `Cancelled | `Msg of string ]) Stdlib.result Lwt.t
val copy_from_build : t -> cancelled:'a Lwt.t -> log:Build_log.t -> [< `Copy_item of Obuilder__.Manifest.t * string | `Copy_items of Obuilder__.Manifest.t list * string ] -> user:Obuilder_spec.user -> workdir:string -> ?dst_dir:string -> from_id:S.id -> S.id -> (unit, [ `Cancelled | `Msg of string ]) Stdlib.result Lwt.t
val servercore : unit -> [ `Docker_image of string ] Lwt.t

Get the Windows ServerCore image based on the same version as the host.

module Docker_config : sig ... end

Derive Docker command-line client parameters from an OBuilder configuration.

type config

The type of sandbox configurations

val sexp_of_config : config -> Sexplib0.Sexp.t
val config_of_sexp : Sexplib0.Sexp.t -> config
val cmdliner : config Cmdliner.Term.t

cmdliner is used for command-line interfaces to generate the necessary flags and parameters to setup a specific sandbox's configuration.

val create : config -> t Lwt.t

create config is a Docker sandboxing system that is configured using config.

OCaml

Innovation. Community. Security.