Yes, you can definitely grow ginger in a pot of any containers which has proper drainage with non clay but preferably sandy type of soil or compost. Wet and damp soil usually cause ginger plant to rot and die easily. Growing gingers in pot basically confine the roots but a healthy soil setup still allows you to grow just as much ginger as groing on the ground.
Try it and wait a few months for some wonderful and tasty ginger. Whenever the ginger plant turn yellow or starts to dry up, dig it out and check if the plant is dying or salvage whatever you can or remove the dead roots while plant the healthy part back.