A mix task for EDIB (elixir docker image builder).
EDIB creates a docker image of your application release.
Just run this and confirm:
mix archive.install https://git.io/edib-0.8.1.ez
Don't forget to add exrm
to your project:
defp deps do
[
{:exrm, "~> 1.0"},
]
end
mix edib
mix help edib
Override the (repository) name of the docker image
mix edib --name <NAME>
mix edib -n <NAME>
Set only a specific prefix for the docker image name (default: local)
mix edib --prefix <PREFIX>
mix edib -p <PREFIX>
Set a specific tag for the docker image
mix edib --tag <TAG>
mix edib -t <TAG>
If --name
and --prefix
are given, the name option takes precedence
(prefix will be ignored).
Following options use https://github.com/ntrepid8/ex_strip_zip in the edib-tool build environment.
All .beam files in a release can be stripped (mostly of debug information):
mix edib --strip
mix edib -x
More technical information about stripping: http://erlang.org/doc/man/beam_lib.html#strip-1
All OTP applications can be bundled into archives (.ez files):
mix edib --zip
mix edib -z
WARNING: Do not use this if you have NIFs in your codebase or dependencies.
More technical information about "Loading of Code From Archive Files": http://erlang.org/doc/man/code.html#id104826
Silence build output of EDIB (will be logged to .edib.log
instead)
mix edib --silent
mix edib -s
Map additional volumes for use while building the release
mix edib --mapping <FROM>:<TO>[:<OPTION>]
mix edib -m <FROM>:<TO>[:<OPTION>]
For common cases there are some mapping shorthands:
Include the host user's SSH keys for private GitHub repositories
mix edib --ssh-keys
Include host user's .hex/packages cache
Can improve build times when the host's .hex cache is available for every build run (tip for Travis CI: use their directory caching)
mix edib --hex
Include host user's .npm package cache
Can improve build times when the host's .npm cache is available for every build run (tip for Travis CI: use their directory caching)
mix edib --npm
Docker flags (mostly for debug purposes):
Run the build step privileged
mix edib --privileged
Do not remove intermediate containers on build runs
mix edib --no-rm