  We introduce a new model of hard spheres under confinement for the study of
the glass and jamming transitions. The model is an one-dimensional chain of the
$d$-dimensional boxes each of which contains the same number of hard spheres,
and the particles in the boxes of the ends of the chain are quenched at their
equilibrium positions. We focus on the infinite dimensional limit ($d \to
\infty$) of the model and analytically compute the glass transition densities
using the replica liquid theory. From the chain length dependence of the
transition densities, we extract the characteristic length scales at the glass
transition. The divergence of the lengths are characterized by the two
exponents, $-1/4$ for the dynamical transition and $-1$ for the ideal glass
transition, which are consistent with those of the $p$-spin mean-field spin
glass model. We also show that the model is useful for the study of the growing
length scale at the jamming transition.
