We present a detailed analysis of the H_2 and HD absorption lines detected in the Damped Lyman-alpha (DLA) system at z_abs=2.3377 towards the quasar Q1232+082. We show that this intervening cloud has a covering factor smaller than unity and covers only part of the QSO broad emission line region. The zero flux level has to be corrected at the position of the saturated H_2 and optically thin HD lines by about 10%. We accurately determine the Doppler parameter for HD and CI lines (b = 1.86+/-0.20 km/s). We find a ratio N(HD)/N(H_2)=(7.1 +3.7 -2.2)x10^-5 that is significantly higher than what is observed in molecular clouds of the Galaxy. Chemical models suggest that in the physical conditions prevailing in the central part of molecular clouds, deuterium and hydrogen are mostly in their molecular forms. Assuming this is true, we derive D/H = (3.6 +1.9 -1.1)x10^-5. This implies that the corresponding baryon density of the Universe is Omega_b h^2 = (0.0182 +0.0047 -0.0042). This value coincides within 1sigma with that derived from observations of the CMBR as well as from observations of the D/H atomic ratio in low-metallicity QSO absorption line systems. The observation of HD at high redshift is therefore a promising independent method to constrain Omega_b. This observation indicates as well a low astration factor of deuterium. This can be interpreted as the consequence of an intense infall of primordial gas onto the associated galaxy.