Genesis 40:4

And the captain of the guard charged Joseph with them, and he served them; so they were in custody for a while.