  Let $X$ be a smooth curve over a finitely generated field $k$, and let $\ell$
be a prime different from the characteristic of $k$. We analyze the dynamics of
the Galois action on the deformation rings of mod $\ell$ representations of the
geometric fundamental group of $X$. Using this analysis, we prove analogues of
the Shafarevich and Fontaine-Mazur finiteness conjectures for function fields
over algebraically closed fields in arbitrary characteristic, and a weak
variant of the Frey-Mazur conjecture for function fields in characteristic
zero.
  For example, we show that if $X$ is a normal, connected variety over
$\mathbb{C}$, the (typically infinite) set of representations of
$\pi_1(X^{\text{an}})$ into $GL_n(\overline{\mathbb{Q}_\ell})$, which come from
geometry, has no limit points. As a corollary, we deduce that if $L$ is a
finite extension of $\mathbb{Q}_\ell$, then the set of representations of
$\pi_1(X^{\text{an}})$ into $GL_n(L)$, which arise from geometry, is finite.
