ExDockerCompose v0.1.0 ExDockerCompose.Subcommands View Source
A module that is the source of truth for the supported subcommands on docker-compose
.
as well as how they should be used.
Link to this section Summary
Functions
Build the full command that should be running, this function will parse the arguments and will build a command line commnad out of the subcommand and the arguments and their parameters
Get a list of all supported subcommands
Link to this section Functions
Build the full command that should be running, this function will parse the arguments and will build a command line commnad out of the subcommand and the arguments and their parameters
Parameters
compose_bin
- The full path to thedocker-compose
binarysubcommand
- The subcommand thatdocker-compose
will run.compose_opts
- A list of parameters and their optional arguments used fordocker-compose
cli - meaning not for the subcommand. For example::f
(-f
) or:no_ansi
(--no-ansi
) Every item on theList
is either an atom (:d
,:timeout
) or a tuple where the first item is the anAtom
that is the paramter and the rest are arguments to the paramter (space separated). For example:[{:p, "project-name"}, {:f, "docker-compose.yml"}, :skip_hostname_check]
opts
- A list of parameters and their optional arguments for the subcommand. The structure is similar to the one described incompose_opts
, but those will come after the subcommand. For example:[:d, {:t, 10}]
.
TODO
Both opts
and compose_opts
currently only support one argument for a subcommand, i.e.
[:d, {:t, 10},...]
is ok while [:d, {:t, 10, 20}]
is not.
Link to this function
get_supported_subcommands()
View Source
get_supported_subcommands() :: subcommands :: List.t()
Get a list of all supported subcommands
Examples
iex> ExDockerCompose.Subcommands.get_supported_subcommands()
[:build, :bundle, :config, :create,
:down, :events, :exec, :help,
:images, :kill, :logs, :pause,
:port, :ps, :pull, :push,
:restart, :rm, :run, :scale,
:start, :stop, :top, :unpause, :up]