Cooling or heating of containers for metal to be extruded