package obuilder

  1. Overview
  2. Docs

Sandbox builds using runc Linux containers.

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

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

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 : state_dir:string -> config -> t Lwt.t

create ~state_dir config is a runc sandboxing system that keeps state in state_dir and is configured using config.