DockerBuild.Plugins behaviour (DockerBuild v0.11.0) View Source
A behaviour for a plugin system allowing functionality to be extended when building the docker image.
By implementing the optional callbacks the docker file can be changed at various points.
All callbacks are optional.
Creating a plugin
- Create module e.g.
MyProject.MyPlugin
- Add
use DockerBuild.Plugins
- Implement the required callbacks to modify the docker file or
.dockerignore
- To fetch a plugin config value with the plugin callback use
plugin_config(context, key)
wherecontext
is either theconfig
ordf
parameter passed to the callback.
Link to this section Summary
Callbacks
Invoked before compiling - can be used to install any development dependencies, e.g. linux packages
Invoked before getting mix dependencies
Invoked before copying all source files
Dependent plugins
Invoked when creating the .dockerignore file.
Invoked at start to install any build dependencies - e.g linux packages
Invoked at start to install any runtime dependencies - e.g linux packages
Link to this section Types
Specs
The dockerfile config
Specs
The dockerfile
Link to this section Callbacks
Specs
Invoked before compiling - can be used to install any development dependencies, e.g. linux packages
Specs
Invoked before getting mix dependencies
Specs
Invoked before copying all source files
Specs
deps() :: [module()]
Dependent plugins
Specs
Invoked when creating the .dockerignore file.
A list of addition lines can be returned which are added to the file.
Specs
Invoked at start to install any build dependencies - e.g linux packages
Specs
Invoked at start to install any runtime dependencies - e.g linux packages