A system capable of generating foam in a sanitary appliance includes a dosing device previously filled with a foaming substance, the dosing device metering a dosage of the substance, an agitation mechanism to agitate the substance to create foam, a receptacle to retain the substance for communication with the agitation mechanism, a fluid supply to allow fluid transport of the substance to the receptacle, and a trigger for activating the fluid supply. A dosing device of this system is further provided, including a container filled with a foaming substance, a positioner to position and house the container, the positioner further including a pin capable of creating a bottom aperture of the container, a fluid supply, wherein the outlet of the fluid supply is directed at the aperture on the bottom end of the container. A container is also provided that can be used in the dosing device.