Elastic interactions between dislocations in a finite body