I have never tried to grow a potato in a bag or container.
I do know that the roots of a potato will go outward in all directions up to 3 feet, and as deep as 4 feet. The roots of one plant will ramify around 20 cubic feet of soil when planted in the ground.
Now think about that many roots trying to abide in a bag?
I don't know what you think, but I am seeing a terrible handicap placed on the plant. It may be fun to try it though. Have fun.
If you have a spot of real earth even two feet square, you can devote to a potato plant, try planting one in the ground as a test too so you can see if there is a difference. Whatever you try, I recommend cutting a piece of potato with two eyes on it to plant. This usually gives several nice sized taters, where if you plant a whole potato, you end up with a lot of small potatoes, like marbles.
Gardening at 5000 feet elevation, zone 4/5 Northern Utah, Frost free from May 25 to September 8 +/-