what kind of container? Molded plastic pond, Plastic storage bin or livestock tank? Anything should work as long as you have adequate water volume, protection from predation and filtration.
I have had my goldfish in a 180 gallon livestock tub for 8 yrs now. I run 2 500gph pumps into a 5 gallon bucket lava rock and floss filter. I even grow lillies and lots of other plants in it as well. So my answer is yes.