How to run a Strapi dev stack using Docker compose

When you create a content type a js file is written to the host OS as root making it hard to edit. Any ideas?