In 1978, Friedberg and Lee introduced the phenomenological soliton bag model of hadrons, generalizing the MIT bag model developed in 1974 shortly after the formulation of QCD. In this model, quarks and gluons are confined due to coupling with a real scalar field ρ, which tends to zero outside some compact region S⊂R3 determined dynamically from the equations of motion. The gauge coupling in the soliton bag model runs as the inverse power of ρ, already at the semiclassical level. We show that this model arises naturally as a consequence of introducing the warped product metric dsM2+ρ2dsG2 on the principal G-bundle P(M,G)≅M×G with a non-Abelian group G over Minkowski space M=R3,1. Confinement of quarks and gluons in a compact domain S⊂R3 is a consequence of the collapse of the bundle manifold M×G to M outside S due to shrinking of the group manifold G to a point. We describe the formation of such regions S as a dynamical process controlled by the order parameter field ρ.