Dockerfile eDSL, combinators, printer and parser
0

Configure Feed

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

OCaml 96.3%
Dune 1.1%
Other 2.5%
17 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#

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.