A cubic measurement is the three-dimensional derivative of a linear measure, so a cubic foot is defined as the volume of a cube with sides 1 ft in length.
In metric terms a cubic foot is a cube with sides 0.3048 metres in length. One cubic foot is the equivalent to approximately 0.02831685 cubic metres, or 28.3169 litres.
The imperial gallon is a unit for measuring a volume of liquid or the capacity of a container for storing liquid, not the mass of a liquid. Thus, a gallon of one liquid may have a different mass from a gallon of a different liquid.
The U.S. liquid gallon and the U.S. dry gallon are different units defined by different means. The U.S. liquid gallon is defined as 231 cubic inches and equates to approximately 3.785 litres. One imperial gallon is equivalent to approximately 1.2 U.S. liquid gallons.
The U.S. dry gallon is a measurement historically applied to a volume of grain or other dry commodities. No longer commonly used, but most recently defined as 268.8025 cubic inches.