Madock supports several environment variables that allow you to customize command behavior without modifying configuration files.
| Variable | Description | Default | Example |
|---|---|---|---|
MADOCK_SERVICE_NAME |
Override the target container for command execution | php |
db, nginx, node |
MADOCK_USER |
Override the user inside the container | www-data |
root |
MADOCK_WORKDIR |
Override the working directory inside the container | /var/www/html |
/var/www/html/app |
MADOCK_TTY_ENABLED |
Enable/disable TTY mode (useful for CI/CD pipelines) | 1 |
0 or 1 |
MADOCK_TTY_ENABLED="0" madock cli lsMADOCK_USER="root" madock cli whoamiMADOCK_SERVICE_NAME="db" madock bashMADOCK_USER="root" MADOCK_TTY_ENABLED="0" madock cli "php bin/magento setup:upgrade"When running Madock commands in non-interactive environments (GitHub Actions, GitLab CI, Jenkins), disable TTY:
MADOCK_TTY_ENABLED="0" madock composer install --no-interactionWhen you need root privileges to debug permission issues:
MADOCK_USER="root" madock bash