WordPress snippet to use custom icon for Custom Post types in WordPress using Dashicons icon font using the menu_icon argument. The arg also accepts image.
Read this post on wpspeak.com