UPDATE FOR 2021: This still works on 20.04 as well. Enjoy!
By default on Ubuntu 18.04 if an application is open you cannot click on the dock icon again to minimize it and there are no right click options to do so either. The minimize function can only be done from the window control buttons or right clicking the title bar.
To enable minimize on click simply run:
You can now minimize windows using their dock icons as well!