Bubble formation in nanopores: a matter of hydrophobicity, geometry, and size