In this paper, we numerically investigate the dynamics of a compound droplet driven by surface tension variation induced by a thermal gradient in a sinusoidal constriction tube. Initially, the compound droplet with a concentric inner core is spherical and placed in the constriction's upstream region at a low temperature. As time progresses, it migrates downstream with a high temperature. Due to the constriction, the droplet is slowed down in the upstream region and accelerated again right after passing the constriction. This acceleration maximizes the eccentricity. However, the constriction results in an increase in the maximum eccentricity when increasing its depth to a value corresponding to the size of the tube neck, which is greater than or equal to the droplet size. Effects of various parameters, e.g., the Marangoni number Ma, the capillary number Ca, and the radius ratio Rio, are studied. It is found that increasing the Ma number or decreasing the Ca number reduces the maximum eccentricity and prolongs the travel time, i.e., the arrival time, from the upstream to the downstream. A similar reduction in the maximum eccentricity also occurs with the increased Rio ratio. Effects of these parameters on the migration velocity are also revealed.