I did exactly this.
It worked well, with some experimentation...and I like the fact that if it stops working, you can replace the $100 fridge, rather than shell out another $500 or more for a 12v fridge. Some of these only seem to last a few years in full-time use.
I purchased a 1.7 cu ft energy-star dorm fridge that has a mechanical thermostat (not digital or electronic)
I powered that with a GoPower 700 watt PSW inverter...and this inverter has a power-saving 'sleep' mode....so it essentially shuts itself off when the fridge thermostat is not calling for cooling. This is fairly important if the power source is solar.
I used a 110 ah AGM battery and 200 watts of solar.
Since these fridges are not designed for mobile use, you need to figure out a way to keep the fridge door shut when driving. I used a combination of velcro and a really huge rubber band...lol...yep it worked! Also most of these small fridges have a 'skin condenser' so you cant enclose them in a cabinet, or wrap additional insulation on the unit, and neither do you want the sun shining thru an open door or window on the fridge.
If the solar panels are flat mounted on the roof, winter-time power production will drop off (lower sun angles and shorter days) and if you are in a cold climate, this will probably work ok, but if you are in the south, in a warm climate, you might need to tilt the panels or use a small generator to 'top-off' the batteries during days of cloudy/rainy/snowy weather.
Obviously, doubling or tripling the solar output should provide all the power that the fridge will need and lots of surplus for other uses.