As far as I was able to debug the issue the reason is as follows:
Under Docker the mount table looks somewhat like follows:
/dev/mapper/docker-9:1-3063-cf43ec04ee218f73bcc6e0b31f04c73a7c2df8b838a4a391b3b70462d58345e0 on / type ext4 (rw,relatime,discard,stripe=16,data=ordered)
It contains a colon character ':' which is handled specially somewhere in src/jrd/isc_file.cpp
As a result only the former part "/dev/mapper/docker-9" gets prepended to the file name in
the call to isc_expand_filename with expand_mounts = true
Actually it seems to be a problem with firebird failing to interpret the colon character in the
device name. As far as I understand the code in src/jrd/isc_file.cpp firebird is checking
the type of device (disk, nfs, etc) the database is on. It does so heuristicly by looking for ':' and '/' characters.
The device name provided by docker (as far as I understand what's going on - this is my first time using gdb in 10 years or so) is not being interpreted correctly.