Strapi removes newly created tables on server restart

This is because you build your docker image at the current state of strapi when you run docker build. (Creating content types happens on the filesystem.) So by restarting you delete all of the newly created content types,which in turn will delete the tables (most likely) on restart.
What is your use case with that setup? As you use yarn develop I suppose it’s development? Any reason you are using docker for strapi instead of local node? If so you need to mount the relevant strapi folders in the container for it to persist.

If you’re trying to use this setup for production. Don’t.