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.

val create : ?fast_sync:bool -> runc_state_dir:string -> unit -> t Lwt.t

create dir is a runc sandboxing system that keeps state in dir.

  • parameter fast_sync

    Use seccomp to skip all sync syscalls. This is fast (and safe, since we discard builds after a crash), but requires runc version 1.0.0-rc92 or later. Note that the runc version is not the same as the spec version. If "runc --version" only prints the spec version, then it's too old.