This was a 10 minute project done with some Adhesive Velcro and a glue gun. I would suggest using Velcro brand over the dollarstore kind, simply because you're using it to hold glass containers.
Cut the loop side of your Velcro (the soft side!) into sections sized to your nailpolish tops. You could cut them to be fitted to each one if you're more caring of it. I'm lazy and prefer instant gratification.
Any glue would likely work for this part, but again... I like instant gratification projects.
You could glue it on also, but I find it holds just fine with its own adhesive. It just depends on your cabinet I suppose.
I've since affixed all my buffers and files with Velcro, and added them to the mix.
Thanks for reading!