Use createinstallmedia (Apple’s hidden tool) to write the installer to the mounted volume
Convert the dmg to an ISO (CDR format first)
Mount the blank image
Rename the file (the previous command adds .cdr )
You now have a fully bootable, legal ISO file on your Desktop: ~/Desktop/HighSierra.iso (approx. 5.2 GB).
