Configuration
EasyDocker supports configuration through config file, environment variables or CLI options
Precedence
Values are resolved in this order (last wins):
- Default defaults
- Config file values
- Environment variable overrides
- CLI flag overrides
Config file
EasyDocker looks for a YAML config file in the following locations (in order):
--configflag orEASYDOCKER_CONFIGenvironment variable (explicit path)$XDG_CONFIG_HOME/easydocker/config.yaml~/.config/easydocker/config.yaml
yaml
log:
enable: true
level: debug
path: /tmp/easydocker.log
viewer:
log:
lines: 2000If no config file is found, all options use their defaults.
Options
| CLI flag | Environment variable | Config key | Default | Description |
|---|---|---|---|---|
--config | EASYDOCKER_CONFIG | — | auto | Path to YAML config file |
--log-enable | EASYDOCKER_LOG_ENABLE | log.enable | false | Enable file logging |
--log-level | EASYDOCKER_LOG_LEVEL | log.level | warn | Log level: debug, info, warn, error |
--log-path | EASYDOCKER_LOG_PATH | log.path | /var/log/easydocker.log | Log file path |
--viewer-log-lines | EASYDOCKER_VIEWER_LOG_LINES | viewer.log.lines | 2000 | Amount of log lines to fetch for a container |
Examples
Enable debug logging to default path
bash
easydocker --log-enable --log-level=debugUse environment variables
bash
EASYDOCKER_LOG_ENABLE=1 EASYDOCKER_LOG_LEVEL=debug easydockerCustom config file
bash
easydocker --config /etc/easydocker/production.yamlPrint version
bash
easydocker version