Genesis 40:1-6 CJB

1 Some time later it came about that the Egyptian king's cupbearer and baker gave offense to their lord the king of Egypt.
2 Pharaoh became angry with his two officers the chief cupbearer and the chief baker.
3 So he put them in custody in the house of the captain of the guard, in the prison, in the same place where Yosef was kept.
4 The captain of the guard charged Yosef to be with them, and he became their attendant while they remained in prison.
5 One night the two of them, the king of Egypt's cupbearer and his baker, there in prison, both had dreams, each dream with its own meaning.
6 Yosef came in to them in the morning and saw that they looked sad.