Dill is actually related to carrots and like carrots it produces a rather large central tap root. When planting dill keep this in mind, the depth of the container should be suitable for hosting a large root, at least a foot deep preferably a tad more. Dill is also an annual, grown for a single season so you shant have to worry about it accumulating excess roots from one season to the next.
Good drainage holes should be in every container you use, whether it is dill or any other plant. Fill the bottom inch or two of the container with gravel to expedite drainage. Soil will eventually wash down and fill in any airspace between the pebbles. Fill the rest of the container with your potting soil.
Do not to use soil from your yard, especially if you are going to bring your plants inside. Potting soil with some vermiculite and or perlite is best. If you are going to use ground soil, it will probably work, but not as well as potting soil. The soil temperature should be around 60 to 70 F for best results.
Fertilize lightly with a water soluble fertilizer every 7 - 10 days, don't overdo it just a modest amount. Fertilizer in containers will wash out, where as in the ground - it is retained in the soil much longer. With container plants, smaller, but consistent doses of soluble fertilizer with their watering is advisable.
Dill need lots of potassium, incorporating some wood ash into the soil is helpful, mind you in moderation, a teaspoonful for an average sized container will suffice. They also need phosphorus, Some nitrogen is necessary, but too much is not good. Compost added to the containers is a good idea for outdoor plants only.
Once all danger of frost is gone, you may want to keep your potted dill plants outdoors, it is advisable to wait a tad longer as dill is not a cool weather plant and does best in warm, but not hot temperatures.
Any variety of Dill can be grown in a pot, but the more compact varieties are best, especially for novices. Try Fernleaf a dwarf dill variety or Dukat another compact variety which works well in containers. See: Dill Varieties.