Add Directory Service to macOS image
Depends on how you created the image.

If you're using the installer as your source then there's a pane for adding directory servers.

If you're using an installed system as the source then you may have to use something like the dsconfigad command in a script to bind.