Environment Variables

Kannich currently supports the following environment variables to control its behavior when kannich is invoked though the kannichw script.

VariableDefaultDescription
KANNICH_IMAGEderkork/kannich:latestThe Docker image to use for the Kannich builder.
KANNICH_DOCKER_PROXY_PREFIX(none)If set, prepended to the image name. Useful for routing image pulls through a registry mirror or proxy.
KANNICH_DOCKER_PROXY_URL(none)URL of a Docker registry proxy. When set together with credentials, Kannich will log in to this registry before pulling images.
KANNICH_DOCKER_PROXY_USERNAME(none)Username for authenticating with the Docker registry proxy.
KANNICH_DOCKER_PROXY_PASSWORD(none)Password for authenticating with the Docker registry proxy.
KANNICH_CACHE_DIR(docker volume kannich-cache)Host directory to use as the build cache. When unset, Kannich creates and uses a Docker volume named kannich-cache.
KANNICH_BOOTSTRAP_SETTINGS_XMLcontents of ~/.m2/settings.xmlMaven settings.xml content passed into the build. If not set, Kannich reads ~/.m2/settings.xml automatically if it exists.
KANNICH_PROJECT_DIRdirectory of the kannichw scriptRoot directory of the project to build. Mounted into the container as /workspace.
KANNICH_DOCKER_OPTS(none)Additional arguments passed directly to docker run. Useful for platform overrides (e.g. --platform linux/arm64) or port forwarding.