Wait until the docker attach has finished before returning