Create an ISO image from the contents of a directory

hdiutil

hdiutil makehybrid -o {{path/to/output_file}} {{path/to/directory}}

click the source code to copy