Dockerfile eDSL, combinators, printer and parser forked from gazagnaire.org/ocaml-dockerfile

Files
README.md

Dockerfile - Typed Dockerfiles for OCaml: eDSL, printer and parser #

Warning. This is a work-in-progress experimental fork of ocaml-dockerfile. Do not use it in production; use ocaml-dockerfile instead.

A typed representation of a Dockerfile -- the eDSL and combinators, a pretty-printer (Dockerfile.to_string), and a parser (Dockerfile.of_string, ocamllex + menhir). The opam package is nox-dockerfile (the bare dockerfile name belongs to upstream); it exposes the Dockerfile module.

Imported from Anil Madhavapeddy's ocaml-dockerfile and adapted for this tree to drop the ppx_sexp_conv / sexplib dependency: the [@@deriving sexp] serialization was removed, leaving the AST, the eDSL combinators, and the printer, which need only fmt.

Dockerfile.of_string parses a Dockerfile (ocamllex + menhir) back into a Dockerfile.t, round-tripping with Dockerfile.to_string over the instructions the eDSL covers -- so the library can serve as the spec front-end for a builder.

Installation #

Install with opam:

$ opam install nox-dockerfile

If opam cannot find the package, it may not yet be released in the public opam-repository. Add the overlay repository, then install it:

$ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git
$ opam update
$ opam install nox-dockerfile

Credits and license #

ISC, Copyright (c) 2016 Anil Madhavapeddy and the ocaml-dockerfile contributors. See LICENSE.md.