I feel like most comments here are missing the point. I think you understand the concept of "first in, first out" and are just wondering if the "first" here should be closer to the door hinge or further.
In short, I say that the oldest milk should be placed further from the hinge.
My logic comes from my experience in the restaurant industry and actually arranging coolers. Optimally, you want to make it so that without thinking, in a rush, the first item a user sees is the oldest one. This is usually the item that is closest to the door/opening/user/whatever. In the case of storing items in the door itself, I would say that the further an item is from the hinge, the closer it is to the user.