Lots of variables in this question.
How big the battery bank?
How big the fridge?
It's a math problem. Figure that the fridge will have a 50% duty cycle. Take the usable capacity of the battery bank and divide by the current draw from the fridge.
For example, if you have 200 Ah of capacity in AGM batteries, that gives you a 100-amp usable capacity.
My 12vdc compressor fridge draw approx 5 amps when the compressor is running. Figuring a 50% duty cycle, that means it draws 2.5Ah.
If I had nothing else running (which is never the case) the fridge itself could run for 40 hours on the batteries.
Of course, that doesn't consider the extra load incurred by opening the fridge to retrieve food, cooling down food you bought and put in the fridge, extra load due to warmer weather, etc.
On our coach where we have the 12vdc compressor fridge we boondock quite a bit. If we're careful with things, it we usually consume about 75 Ah in 24 hrs running the fridge, a few LED lights, the water pump, and the roof vent fan. There have been days we've done better and some where we've done worse.
This is all just an example though, as you'll need to calculate your particular situation incorporating whether or not you have solar, how much you draw from batteries for other things, etc.
1994 Excella 25 Follow the build on Gertie!
1999 Suburban LS 2500 w/7.4L V8
1974 GMC 4108a - Custom Coach Land Cruiser