Oh yes you can. I would want a pot at least 12 inches deep though, now I would say depending on your climate you might not get good bulb formation by starting garlic from cloves now. Somthing about the cloves desiring x hours of chill to get the message to bulb out. Though you can still use the greens to the same flavor effects. And keep them alive to form bulbs the follow year. Jon from "grow your own greens" on YouTube grew I think 50 bulbs in a half whiskey cask on his driveway.
Though your saying you're doing this to save some space, so you may want to consider interplanting garlic with other plants whether in containers or in the ground. Companion planting guides say it lends very well for this use just stay away from Beans Peas and Parsley so says http://en.wikipedia.org/wiki/List_of_... .
I have tossed it around my tomatoes peppers and potatoes and have not seen anything negative about the space sharing.
Good luck on your garlic, let us know what you choose and how it turns out.
Garlic and coffee ground mulch
Half whiskey barrel