Especially if you are planting an organic container garden, ladybugs are an excellent way to control aphids in your garden. And yes, they do work in container gardens as well. But there is some useful advice if you plan on releasing ladybugs into your garden so that they will stay where you want them!
First, always purchase your ladybugs from a reputable source, whether it be from a garden supply store or through mail order. The best source of ladybugs here is a local farmer’s market selling fresh produce, so check that as well.
When you get them home, keep them in the bag (whether they arrived in a mesh bag or paper bag) along with a couple drops of water. Ladybugs tend to be thirsty when they arrive, and this is the main reason why they fly away as soon as you release them, because they are looking for water. If you place the bag in your refrigerator for a few hours, it will chill them a bit, which will also slow them down when you release them.
Water your garden very well before you release them. They will be thirsty, and a well watered garden will keep them near, since you have provided them with an easy source of water to drink.
Always release ladybugs in the evening, after sunset. This will prevent the chance of a bird eating them before they have had time to figure out their new surroundings. Then, first thing in the morning, they will begin work on the aphids!