In a 10-inch cast-iron skillet (or oven-proof skillet) melt the butter.
Add the onions and oil, and cook over medium heat, stirring now and then but not too often, for 30 minutes until onions are caramelized.
Add the vinegar and mix for another minute until it is evaporated.
Add the sour cream, mayo, garlic powder, black pepper, and mix to combine.
Add the grated gruyere and mix to combine.
Put the skillet in a preheated 350°F oven for 15 minutes, then remove and serve immediately with crusty bread.