It seems like WordPress generates this file (not sure how but I think maybe in wp-admin/includes/network.php or wp-includes/class-wp-rewrite.php) at some point (including on save of the wp-admin/options-permalink.php page).
Might be better to detect that it is not present and auto-generate it instead, in case for whatever reason the hard coded one that we have created is not appropriate.
We are currently 'hard-coding' the .htaccess file here: https://github.com/michaelmcandrew/civicrm-docker/blob/5f4c24fb1d4b130c71b71c0f4a0945c51a3ae773/wordpress/Dockerfile#L30
It seems like WordPress generates this file (not sure how but I think maybe in wp-admin/includes/network.php or wp-includes/class-wp-rewrite.php) at some point (including on save of the wp-admin/options-permalink.php page).
Might be better to detect that it is not present and auto-generate it instead, in case for whatever reason the hard coded one that we have created is not appropriate.