Configuration Reference
The enclave configuration file allows you to control and templatize parts of the container environment, such as the application command and environment variables, without needing to modify the container image. It is written in YAML.
You can set the enclave configuration using the Anjuna CLI’s disk create
command with a --config <config_file>
parameter.
For example, if your configuration file is config.yml
in the current directory,
use the following command:
$ anjuna-azure-cli disk create \
--disk=nginx.raw \
--docker-uri=nginx:latest \
--config=config.yml
Version 1.7 of the enclave configuration file is a YAML file with the following fields.
version
This is the version of the configuration file and is the only mandatory field. Anjuna recommends to use the latest version available (currently 1.7) as follows:
version: 1.7
Docker overrides
You can use the enclave configuration file to override Dockerfile entries at runtime, without modifying the Dockerfile itself.
environment
This is a list of environment variables to be used in the container application.
The format of these environment variables should be <environment variable name>=<environment
variable value>
.
These values are added (and replaced if needed) to the environment variables provided by the Docker
image.
For example, to provide the environment variables PROFILE=anjuna
and NAMESPACE=anjunamespace
,
use the entry:
environment:
- PROFILE=anjuna
- NAMESPACE=anjunamespace
command
This is the command line to use for the container application, for both the path of the application and all arguments provided to it. If this value is omitted, the command line used is the one provided by the Docker image.
For example, to set the application command as ls -la /usr/bin
, use the entry:
command:
- ls
- -la
- /usr/bin
autoTerminate
By default, the enclave will not terminate when the container application exits,
as serial logs can only be read while the enclave is running.
However, to prevent the enclave from consuming resources after it has satisfied its purpose,
auto termination can be turned on by adding autoTerminate: true
to the enclave’s configuration
file.
autoTerminate: true