I think you are looking for kickstart: https://fusionauth.io/docs/v1/tech/installation-guide/kickstart
Here's how to run configure Kickstart to run when you are using docker: https://fusionauth.io/docs/v1/tech/installation-guide/docker/#kickstart
I'm not sure how you are starting your containers, but I imagine you could create and make a kickstart file available in other deployment environments also.