You can carry perishables onboard the aircraft in a cooler that meets carryon size standards. For safety, you should use a sealed coolant product such as "Blue Ice" to keep it cold; real ice might leak if the bag fell over.
Dry ice is not allowed on aircraft except when special vented disposable professional packaging is used for it. Dry ice *can* cause explosions under certain conditions.
If you wish to check a cooler, do not put perishables in it, and do not tape it before you arrive at the airport. Contents of all coolers must be inspected before they are accepted as checked baggage; no ice, dry ice, or containers of liquid with a broken seal will be accepted. (Such as a bottle of wine that has been opened.)
Use a luggage strap to keep it shut.
Lastly, you could always stop for milk, juice, etc. at a convenience store. It won't be especially cheap, but it is an option. (Caution re: milk from convenience stores; check the sell-by date, sometimes they don't get rid of things when they should.)