Baked-in env vars in Docker image override config file settings
What happened
The codenotary/immudb Docker image ships with several IMMUDB_* environment variables baked in (visible via docker inspect, e.g. IMMUDB_DIR=/var/lib/immudb, IMMUDB_PORT=3322, etc). Since immudb resolves config as flags > env vars > config file, these baked in env vars silently override matching keys when using --config with a mounted TOML file. No warning or error is logged when this happens.
In our setup, dir = "./data" in immudb.toml was silently ignored. immudb kept writing data to /var/lib/immudb instead of our mounted volume. Data wasn't actually persisted across container restarts, and there was no error or warning pointing to why.
What you expected to happen
I did not expect the image to bake in a fixed set of IMMUDB_* environment variables that outrank the config file. I expected the defaults to live inside the binary itself, and only be overridden if I (the user) explicitly set an environment variable or flag myself. Because the image pre-sets these env vars for me, my config file gets silently overridden even though I never touched the environment.
How to reproduce it (as minimally and precisely as possible)
- Mount a
configs/immudb.tomlcontaining:dir = "./data" - Run the container with
command: ["--config=/configs/immudb.toml"]and volumes./data:/dataand./configs:/configs. - Check the startup banner in the logs, it shows
Data dir : /var/lib/immudb, not./data. - Check the mounted
./datafolder on the host, it stays empty even though the container reports databases being created.
As a sanity check, overriding the env var to empty (-e IMMUDB_DIR=) makes immudb fall back to the toml value correctly, so the config file parsing itself is fine, it's the baked in env var that outranks it.
Environment
immudb 1.11.0
Commit : bfdce03649f52d575be46f74425fd18eaf4fa69c
Built at: Thu, 03 Sep 2026 06:46:12 UTC
Static : trueAdditional info (any other context about the problem)
Full list of env vars baked into the codenotary/immudb:latest image that outrank the config file:
IMMUDB_DIR=/var/lib/immudb
IMMUDB_ADDRESS=0.0.0.0
IMMUDB_PORT=3322
IMMUDB_PIDFILE=
IMMUDB_LOGFILE=
IMMUDB_MTLS=false
IMMUDB_AUTH=true
IMMUDB_DETACHED=false
IMMUDB_DEVMODE=true
IMMUDB_MAINTENANCE=false
IMMUDB_ADMIN_PASSWORD=immudb
IMMUDB_PGSQL_SERVER=trueAny config file key not in this list (e.g. pgsql-server-port, token-expiry-time, pkey) loads from the TOML file as expected.
Source: codenotary/immudb