Hi Björn,
which Docker storage driver are you using?
In my own experiments, I recently realized BaseX does not play very well with copy-on-write, resulting in heavy fragmentation. If you're using BTRFS or ZFS, you should definitely make sure to disable copy on write for the BaseX database when performing frequent updates. I have not verified whether BTRFS' autodefrag option improves this.
This is not a Docker issue, but one with the file systems (databases need tuning for those kinds of file systems in general).
Regards, Jens