lxd v0.1.6 LXD.Container

Link to this section Summary

Link to this section Functions

Link to this function all(opts \\ [])

List all containers

Link to this function create(configs, opts \\ [])

Create a new container

configs is a map that define how to create the container

See official documention for more details here

Link to this function exec(container_name, command, envs \\ %{}, opts \\ [])

Run a remote command

  • command: must be a list splitted by space (see official documentation)
  • envs: map of environement variables to set

Record output is set to true Return {:ok, return_code, stdout, stderr} if success Return {:error, reason} if error If stdout or stderr can’t be read, :error is set instead

Does not support websocket

See official documention for more details here

Link to this function freeze(container_name, opts \\ [])
Link to this function info(container_name, opts \\ [])

Container information

Link to this function metadata(container_name, opts \\ [])
Link to this function remove(container_name, opts \\ [])

Remove the container

Link to this function rename(container_name, new_name, opts \\ [])

Rename the container

Link to this function replace(container_name, configs, opts \\ [])

Replace container configuration

Link to this function restart(container_name, opts \\ [])
Link to this function start(container_name, opts \\ [])
Link to this function state(container_name, opts \\ [])

State of the container

Status of the container as a string

Link to this function stop(container_name, opts \\ [])

Stop the container

Link to this function unfreeze(container_name, opts \\ [])
Link to this function update(container_name, configs, opts \\ [])

Update container configuration