They sell everything you'd need to do it but it's expensive. Apparently the issue is that dynamo's produce alternating current, while charging uses direct current. Also charging often handles constantly varying degrees of out put poorly (like how it produces a lot more electricity going diwnhill that it dies uphill).
If your bike touring and throw some cash at it it can definitely be done. But it's not cheap for the casual user much easier to charge at home or even bring an extetnal battery that you charge at home if needed.