Module Dockerfile_gen
val generate_dockerfile : ?fname:string ‑> ?crunch:bool ‑> Fpath.t ‑> Dockerfile.t ‑> (unit, [> Rresult.R.msg ]) Result.result
generate_dockerfile output_dir docker
will output Dockerfile inside theoutput_dir
subdirectory.The
crunch
argument defaults to true and applies theDockerfile.crunch
optimisation to reduce the number of layers; disable it if you really want more layers.
val generate_dockerfiles : ?crunch:bool ‑> Fpath.t ‑> (string * Dockerfile.t) list ‑> (unit, [> Rresult.R.msg ]) Result.result
generate_dockerfiles output_dir (name * docker)
will output a list of Dockerfiles inside theoutput_dir/
subdirectory, with each Dockerfile named asDockerfile.<release>
.The
crunch
argument defaults to true and applies theDockerfile.crunch
optimisation to reduce the number of layers; disable it if you really want more layers.
val generate_dockerfiles_in_directories : ?crunch:bool ‑> Fpath.t ‑> (string * Dockerfile.t) list ‑> (unit, [> Rresult.R.msg ]) Result.result
generate_dockerfiles_in_directories output_dir (name * docker)
will output a list of Dockerfiles inside theoutput_dir/name
subdirectory, with each directory containing the Dockerfile specified bydocker
.The
crunch
argument defaults to true and applies theDockerfile.crunch
optimisation to reduce the number of layers; disable it if you really want more layers.
val generate_dockerfiles_in_git_branches : ?readme:string ‑> ?crunch:bool ‑> Fpath.t ‑> (string * Dockerfile.t) list ‑> (unit, [> Rresult.R.msg ]) Result.result
generate_dockerfiles_in_git_branches output_dir (name * docker)
will output a set of git branches in theoutput_dir
Git repository. Each branch will be namedname
and contain a singledocker
file. The contents of these branches will be reset, so this should be only be used on anoutput_dir
that is a dedicated Git repository for this purpose. Ifreadme
is specified, the contents will be written toREADME.md
in that branch.The
crunch
argument defaults to true and applies theDockerfile.crunch
optimisation to reduce the number of layers; disable it if you really want more layers.