If you are travelling via Dubai, you will not be entering Dubai but will be directed to the Transit area to check in for your onward flight to Doha. If you plan to break your journey in Dubai (max 3 days), you can book a package with Emirates Airlines and you can enter Dubai (on arrival).