FWIW it wasn't took hard to make a little Dockerfile with python:2.7-alpine and have it bind-mount the a directory of data and run in there. (With a USER directive setting it to my UID.)
Note that its "pine" output format is... almost what Thunderbird wants, except for nested mailbox effects. That'll require renaming directories from foo to foo.sbd and sometimes adding a corresponding blank foo file.