Found a nice bash function recently that helps to create a DMG file from Terminal. Edit the ~/.zprofile file:
nano ~/.zprofile
Add that code:
dmg(){
hdiutil create -fs HFS+ -srcfolder "$1" -volname "$2" "$2.dmg"
}
Example:
dmg ModulbankInformer.app ModulbankInformer