It is going to depend on a number of things such as which model fridge you have, how much is in the fridge, temperatures when you are running the fridge and the capacity and condition of your batteries. That said, lets consider a hypothetical boat with a house bank consisting of two new 100 amp-hr AGM batteries, a fridge that draws 2.2 amps at 12 VDC when the compressor is running and a compressor duty cycle of 50% on. 2.2 amps is the standard amp draw for the Nova Kool fridges of up to 3.5 cu. ft. Note that smaller fridges will have lower duty cycle percentages and will consume fewer amp-hours per day than larger fridges. In that case the fridge will draw 2.2 amps when the compressor is running, with a 50% duty cycle the fridge will consume 1.1 amp-hr per hour of operation and 26.4 amp-hr per day. The two 100 amp-hr AGM batteries should not be drawn down by more than 50% of their capacity to get decent battery life. They can be drawn down by more than 50%, but it will shorten battery life if it happens frequently. So two 100 amp-hr batteries have a total capacity of 200 amp-hr of which 100 amp-hr is usable on a routine basis. If the fridge is drawing 26.4 amp-hr per day, you can run the fridge for three days and 18 hours before the batteries will be down to 50% capacity. Similarly if the fridge compressor runs 100% of the time, the fridge will draw 52.8 amp-hr per day and the two 100 amp-hr batteries will run the fridge for just under two days before they are drawn down to 50%. Note that these times are based on the assumption that nothing else is turned on.
I would say that a 100% fridge duty cycle is a worst case scenario and a 50% duty cycle is pretty close to best case. Things that impact the fridge's duty cycle include how hot it is. Obviously the fridge will run more in hot weather, so the duty cycle will increase and the batteries will last for less time. What you have in the fridge also impacts the duty cycle. A full fridge has more thermal mass than an empty fridge so the full fridge will cycle on less than the empty one making the batteries last longer if you keep the fridge full. Also older batteries will have less capacity the older they get.
So basically the answer is somewhere between about 1.5-2 days and about 3.5 to 4 days. If you have a 145 watt solar panel with the standard PWM solar controller, you can expect a maximum of about 50 amp-hours from the solar panel on a full sun mid-summer day. So in theory, the solar panel could run your fridge indefinitely as long as you have cloud free days and don't have anything on the cabin top racks that shades the panel. In practice, a 145 watt solar panel should extend you fridge use by about 50 to 100% since not all days are cloud free.
Adding a Victron Smart Shunt to your electrical system (about $150 for the shunt and the required new short piece of battery cable) will let you monitor your battery capacity, which will greatly improve your peace of mind.
I hope this helps.