Thermal motion of nanoscale liquid Pb inclusions attached to fixed dislocations in thin Al foils is investigated using in-situ TEM. In contrast with 3D random motion of free inclusions, the attached inclusions demonstrate oscillations in the close proximity of the dislocations. This is due to the elasticity of the dislocations. It is found that inclusions captured by one dislocation repulse at small separations, and attract at large ones and this is also caused by the dislocation elasticity. Such behaviour of trapped inclusions can be considered as a motion in a potential well or in coupled potential wells in the case of motion of several trapped inclusions on one dislocation. The potential of interaction of an inclusion with a dislocation and the potential of mutual interaction between inclusions are determined.