Dockerfile eDSL, combinators, printer and parser
0

Configure Feed

Select the types of activity you want to include in your feed.

4 1 0

Clone this repository

https://git.vm.fail/gazagnaire.org/ocaml-dockerfile https://git.vm.fail/did:plc:zvls5fwnnqutychf6rltmpud
ssh://git@git.recoil.org:2222/gazagnaire.org/ocaml-dockerfile ssh://git@git.recoil.org:2222/did:plc:zvls5fwnnqutychf6rltmpud

For self-hosted knots, clone URLs may differ based on your setup.


README.md

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

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.

Credits and license#

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