io.Writer is an interface, as you do not use SetOptionRawTerminal here, you don't need the function to receive a DockerConn.
But this changes nothing.