package dockerfile-opam

  1. Overview
  2. Docs

Module Dockerfile_opam.WindowsSource

Windows specific Dockerfile utility functions.

Sourceval run_cmd : ('a, unit, string, Dockerfile.t) format4 -> 'a

run_cmd fmt will execute cmd /S /C fmt.

Sourceval run_powershell : ?escape:(string -> string) -> ('a, unit, string, Dockerfile.t) format4 -> 'a

run_powershell fmt will execute powershell -Command "fmt".

  • parameter escape

    (defaults to Fun.id) allows to escape fmt because the calling shell (usually cmd) might interpret unwanted things in fmt. This might help embedding readable powershell code.

Sourceval run_vc : arch:Ocaml_version.arch -> ('a, unit, string, Dockerfile.t) format4 -> 'a

run_vc ~arch fmt will execute run fmt with Visual Compiler for ~arch loaded in the environment.

Sourceval run_ocaml_env : string list -> ('a, unit, string, Dockerfile.t) format4 -> 'a

run_ocaml_env args fmt will execute fmt in the environment loaded by ocaml-env exec with args.

Sourceval sanitize_reg_path : unit -> Dockerfile.t

sanitize_reg_path () adds the command necessary to remove a trailing backslash from the PATH value stored in the registry and must be called before any further manipulation of this variable is done in the Dockerfile. The following error is raised if PATH isn't sanitized.

/usr/bin/bash: -c: line 0: unexpected EOF while looking for matching `"'
/usr/bin/bash: -c: line 1: syntax error: unexpected end of file
Sourceval install_vc_redist : ?vs_version:string -> ?arch:Ocaml_version.arch -> unit -> Dockerfile.t
Sourceval ocaml_for_windows_package_exn : switch:Ocaml_version.t -> port:[ `Mingw | `Msvc ] -> arch:Ocaml_version.arch -> string * string

ocaml_for_windows_variant ~port ~arch returns the (package_name, package_version) of the OCaml compiler package in OCaml for Windows, if applicable.

Sourceval remove_system_attribute : ?recurse:bool -> string -> Dockerfile.t

Remove the system attribute on a path. Might be useful to copy data across images when building Docker images.

Sourceval header : ?alias:string -> override_tag:string option -> Distro.t -> Dockerfile.t

A Dockerfile header for multi-staged builds.

Sourcemodule Cygwin : sig ... end

Rules for Cygwin-based installation.

Sourcemodule Winget : sig ... end

Rules for winget installation.

OCaml

Innovation. Community. Security.