It is said in the holy books ;That once Josef son of Jacob dreamt that the moon , the sun and 11 stars knelt for him. He told his father Jacob about his dream and his father told him not to tell your brothers because they are jealous. And after many adventures Josef became a minister and his brothers and parents went to see him as a Pharaoh's Minister.
Once Josef was in the prison as one of the adventures, there were two prisoners one asked him what it means if you see pressing the grape juice and Josef answered: You will serve wine for Pharaoh.
And the other asked, what does it mean if you see you are carrying bread on your head and the birds are eating from it?
He answered you will be hanged up and the birds will eat your head.
Another story is about Pharaoh's dream. One night he dreamt about 7 thick cows that 7 thin cows ate them and there were 7 green wheat bunches that were eaten by 7 yellow ones. He called his astronomers and astrologers and asked them the meaning but they told him it is a messed dream and has no meaning. The prisoner who was now the wine server said I know someone in the prison who knows send me there. Josef interpreted that there will be rains and blessings for 7 years then there won't rain for another 7 years and the solution is that you keep half of the harvest for the next 7 years.