Genesis 40:3–4
3 fand he put them in custody in the house of the captain of the guard, in the prison where Joseph was confined. 4 The captain of the guard appointed Joseph to be with them, and he attended them. They continued for some time in custody.
Genesis 41:10
10 When Pharaoh was zangry with his servants aand put me and the chief baker in custody in the house of the captain of the guard,
Genesis 41:12
12 A young Hebrew was there with us, a servant of the captain of the guard. When we told him, che interpreted our dreams to us, giving an interpretation to each man according to his dream.