ocurrent/ocaml-dockerfile

OCaml interface for creating Dockerfiles

OCaml

68

1,041 commits

updated Sep 10, 2026

See the code

README

dockerfile — Dockerfile eDSL and distribution support

%%VERSION%%

OCaml-CI Build Status

Docker is a container manager that can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands you would normally execute manually in order to build a Docker image. By calling docker build from your terminal, you can have Docker build your image step-by-step, executing the instructions successively. Read more at https://docker.com.

This library provides a typed OCaml interface to generating Dockerfiles programmatically without having to resort to lots of shell scripting and awk/sed-style assembly.

ocaml-dockerfile is distributed under the ISC license.

Installation

dockerfile can be installed with opam:

opam install dockerfile
opam install dockerfile-opam
opam install dockerfile-cmd

The dockerfile-opam package includes modules for OPAM- and Linux-specific Dockerfile generation, such as common distributions.

If you don't use opam consult the opam file for build instructions.

ocaml

Contributors

avsm

465 commits

MisterDA

227 commits

mtelvers

188 commits

dra27

72 commits

ocurrent/ocaml-dockerfile

OCaml interface for creating Dockerfiles

OCaml

68

1,041 commits

updated Sep 10, 2026

See the code

README

dockerfile — Dockerfile eDSL and distribution support

%%VERSION%%

OCaml-CI Build Status

Docker is a container manager that can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands you would normally execute manually in order to build a Docker image. By calling docker build from your terminal, you can have Docker build your image step-by-step, executing the instructions successively. Read more at https://docker.com.

This library provides a typed OCaml interface to generating Dockerfiles programmatically without having to resort to lots of shell scripting and awk/sed-style assembly.

ocaml-dockerfile is distributed under the ISC license.

Installation

dockerfile can be installed with opam:

opam install dockerfile
opam install dockerfile-opam
opam install dockerfile-cmd

The dockerfile-opam package includes modules for OPAM- and Linux-specific Dockerfile generation, such as common distributions.

If you don't use opam consult the opam file for build instructions.

ocaml

Contributors

avsm

465 commits

MisterDA

227 commits

mtelvers

188 commits

dra27

72 commits

Languages

OCaml

98.5%

Dune

1.1%