dockerTools unable to export large-ish (concourse-git-resource) image

I ended up running against a patched nixpkgs running with xtrace, and discovered that it’s the mount -t overlay that’s failing. The image in question has 19 layers; splitting this up into 16 layers at a time solved the problem.

PR filed as dockerTools: Support mounting images with more than 16 layers (#392421) by charles-dyfis-net · Pull Request #392422 · NixOS/nixpkgs · GitHub