  We explore the feasibility of a compact high-precision Hg atomic clock based
on a hollow core optical fiber. We evaluate the sensitivity of the
$^1S_0$-$^3P_0$ clock transition in Hg and other divalent atoms to the fiber
inner core surface at non-zero temperatures. The Casimir-Polder interaction
induced $^1S_0$-$^3P_0$ transition frequency shift is calculated for the atom
inside the hollow capillary as a function of atomic position, capillary
material, and geometric parameters. For $^{199}\mathrm{Hg}$ atoms on the axis
of a silica capillary with inner radius $\geq 15 \,\mu \mathrm{m}$ and
optimally chosen thickness $d\sim 1 \,\mu \mathrm{m}$, the atom-surface
interaction induced $^1S_0$-$^3P_0$ clock transition frequency shift can be
kept on the level $\delta\nu/\nu_{\mathrm{Hg}} \sim10^{-19}$. We also estimate
the atom loss and heating due to the collisions with the buffer gas, lattice
intensity noise induced heating, spontaneous photon scattering, and residual
birefringence induced frequency shifts.
