Move the DockerConn flush to its own function