When gas bubbles rise in a surface-contaminated liquid, the upper parts of their surfaces may be almost free of contaminant and shear stress, while on the remainder of their surfaces there is enough contaminant to prevent tangential motion. Sadhal & Johnson solved the problem of Stokes flow of a uniform stream past a single spherical bubble. We extend their method to a single bubble in an arbitrary axially symmetric Stokes flow with the aid of an inversion theorem due to Harper. We also investigate in detail the interaction between two bubbles rising in line, and show how the methods can be made to deal with three or more bubbles, or a line of one or more bubbles rising towards a free surface. We show that a pair of bubbles will remain the same distance apart only if there is a certain relationship between the sizes of the caps on the bubbles. The cap sizes will normally be determined by convective diffusion of a surface-active solute from the bulk liquid in which the bubbles rise. The position of the lower bubble vertically under the upper one is stable to small horizontal displacements, but the upper bubble rises faster and so the distance apart gradually increases.