We explore the feasibility of a fiber clock, i.e., a compact, high-precision, optical lattice atomic clock based on atoms trapped inside a hollow-core optical fiber. Such a setup offers an intriguing potential both for a substantially increased number of interrogated atoms (and thereby an improved clock stability) and for miniaturization. We evaluate the sensitivity of the 1S0-3P0 clock transition in Hg and other divalent atoms to the fiber inner core surface at nonzero temperatures. The Casimir-Polder interaction induced 1S0-3P0 transition frequency shift is calculated for the atom inside the hollow capillary as a function of atomic position, capillary material, and geometric parameters. For Hg atoms on the axis of a silica capillary with inner radius ≥15 μ m and optimally chosen thickness d ˜1 μ m , the atom-surface interaction induced 1S0-3P0 clock transition frequency shift can be kept on the level δ ν /νHg˜10-19 . We also estimate the atom loss and heating due to collisions with the buffer gas, lattice intensity noise induced heating, spontaneous photon scattering heating, and residual birefringence induced frequency shifts.