How did the nickname for marijuana become pot?

The nickname 'pot' can into play when people began growing marijuana in pots in their closet.