I'm not against exposing its ID to a container, but that deserves a design discussion of its own (since once we choose a convention and applications rely on it, we're stuck with it forever).

You're right that inode alone is not enough. How about inode+device id? (st_dev + st_ino from stat(2)). That seems simple and portable, and should work in every case.