A measurement is presented of the triple-differential dijet cross section at a centre-of-mass energy of 8 TeV using 19.7 fb-1 of data collected with the CMS detector in proton-proton collisions at the LHC. The cross section is measured as a function of the average transverse momentum, half the rapidity separation, and the boost of the two leading jets in the event. The cross section is corrected for detector effects and compared to calculations in perturbative quantum chromodynamics at next-to-leading order accuracy, complemented with electroweak and nonperturbative corrections. New constraints on parton distribution functions are obtained and the inferred value of the strong coupling constant is αS(MZ)=0.1199±0.0015(exp)-0.0020+0.0031(theo) , where MZ is the mass of the Z boson.