  For ultrarelativistic proton-proton and proton-nucleus collisions, we perform
an exploratory study of the contribution to the elliptic flow $v_2$ coming from
the orientation of the momentum of the produced particles with respect to the
reaction plane. Via the CGC factorization valid at high energies, this
contribution is related to the orientation of a color dipole with respect to
its impact parameter, which in turn probes the transverse inhomogeneity in the
target. Using the McLerran-Venugopalan model (with impact-parameter dependence)
as an effective description for the soft gluon distribution in the (proton or
nuclear) target, we present a semi-analytic calculation of the dipole
scattering amplitude, including its angular dependence. We find that the
angular dependence is controlled by soft gluon exchanges and hence is genuinely
non-perturbative. The effects of multiple scattering turn out to be essential
(in particular, they change the sign of $v_2$). We find that sizable values for
$v_2$, comparable to those observed in the LHC data and having a similar
dependence upon the transverse momenta of the produced particles, can be easily
generated via peripheral collisions. In particular, $v_2$ develops a peak at a
transverse momentum which scales with the saturation momentum in the target.
