Akd v0.2.1 Akd.Generator.Dockerfile View Source
This module handles the generation of Dockerfiles which can be used for the deploy process.
This can either directly be called, or called through a mix task,
mix akd.gen.dockerfile
.
This class uses EEx and Mix.Generator to fetch file contents from an eex template and populate the interpolated fields, writing it to the speficied file.
Usage:
The following call creates a file Dockerfile
at location path/to/file/Dockerfile
Akd.Generator.Dockerfile.gen(["Dockerfile"], path: "path/to/file")
Link to this section Summary
Link to this section Functions
This is the callback implementation for gen/2
.
This function takes in a list of inputs and a list of options and generates a Dockerfile at the specified path with the specified name.
The first element of the input is expected to be the name of the file. If no name is given, it defaults to Dockerfile
The path can be sent to the opts
.
If no path is sent, it defaults to ./
Examples:
Akd.Generator.Dockerfile.gen(["Dockerfile"], [path: "some/path"])