We present a mechanism for chondrules to stick together by means of compaction of a porous dust rim they sweep up as they move through the dusty nebula gas. It is shown that dust aggregates formed out of micron-sized grains stick to chondrules, forming a porous dust rim. When chondrules collide, this dust can be compacted by means of rolling motions within the porous dust layer. This mechanism dissipates the collisional energy, compacting the rim and allowing chondrules to stick. The structure of the obtained chondrule-dust agglomerates (referred to as compounds) then consists of three phases: chondrules, porous dust, and dust that has been compacted by collisions. Subsequently, these compounds accrete their own dust and collide with other compounds. The evolution of the compound size distribution and the relative importance of the phases is calculated by a Monte Carlo code. Growth ends, and a simulation is terminated when all the dust in the compounds has been compacted. Numerous runs are performed, reflecting the uncertainty in the physical conditions at the chondrule formation time. It is found that compounds can grow by 1-2 orders of magnitudes in radius, upto dm-sizes when turbulence levels are low. However, relative velocities associated with radial drift form a barrier for further growth. Earlier findings that the dust sweep-up by chondrules is proportional to their sizes are confirmed. We contrast two scenarios regarding how this dust evolved further towards the densely packed rims seen in chondrites.