The {57}Fe-specific phonon density of states of Ba(Fe(1-x)Co(x))2As2 single crystals (x=0.0, 0.08) was measured at cryogenic temperatures and at high pressures with nuclear-resonant inelastic x-ray scattering. Measurements were conducted for two different orientations of the single crystals, yielding the orientation-projected {57}Fe-phonon density of states (DOS) for phonon polarizations in-plane and out-of-plane with respect to the basal plane of the crystal structure. In the tetragonal phase at 300 K, a clear stiffening was observed upon doping with Co. Increasing pressure to 4 GPa caused a marked increase of phonon frequencies, with the doped material still stiffer than the parent compound. Upon cooling, both the doped and undoped samples showed a stiffening, and the parent compound exhibited a discontinuity across the magnetic and structural phase transition. These findings are generally compatible with the changes in volume of the system upon doping, increasing pressure, or increasing temperature, but an extra softening of high-energy modes occurs with increasing temperature. First-principles computations of the phonon DOS were performed and showed an overall agreement with the experimental results, but underestimate the Grueneisen parameter. This discrepancy is explained in terms of a magnetic Grueneisen parameter, causing an extra phonon stiffening as magnetism is suppressed under pressure.