  We study the field profile of a scalar field $\phi$ that couples to a matter
fluid (dubbed a chameleon field) in the relativistic gravitational background
of a spherically symmetric spacetime. Employing a linear expansion in terms of
the gravitational potential $\Phi_c$ at the surface of a compact object with a
constant density, we derive the thin-shell field profile both inside and
outside the object, as well as the resulting effective coupling with matter,
analytically. We also carry out numerical simulations for the class of inverse
power-law potentials $V(\phi)=M^{4+n} \phi^{-n}$ by employing the information
provided by our analytical solutions to set the boundary conditions around the
centre of the object and show that thin-shell solutions in fact exist if the
gravitational potential $\Phi_c$ is smaller than 0.3, which marginally covers
the case of neutron stars. Thus the chameleon mechanism is present in the
relativistic gravitational backgrounds, capable of reducing the effective
coupling. Since thin-shell solutions are sensitive to the choice of boundary
conditions, our analytic field profile is very helpful to provide appropriate
boundary conditions for $\Phi_c \lesssim O(0.1)$.
