Gravity is not the result of a particular shape of an object. It is caused by mass. All objects with mass exert gravity to each other. The larger the mass of an object, the greater the force of gravity.
On Earth, water forms a spherical surface which has the same center as the Earth. It applies to every surface of fluid which is under influence by Earth’s gravity, unaffected by another force. In a 10 cm wide container, the amount of curvature is only 0.0000002 mm. It is the reason the surface appears flat in small containers.