Let x be the capacity of the container in gallons. Half of the container is x/2 and 2/3 of it is 2x / 3. The equation that best represent the given situation above is,
x / 2 + 2 = 2x / 3
The value of x from the equation is 12. Thus, the capacity of the container is 12 gallons.