For the multi-resource fair allocation problem in cloud–edge collaborative computing systems, we propose a mechanism called dominant resource fairness in the cloud–edge collaborative computing system (DRF-CE). DRF-CE enables users to deploy tasks to cloud and edge servers and considers the particularity of cloud server bandwidth resources. By introducing bandwidth demand compression, DRF-CE allows users to have two different bandwidth resource demands. DRF-CE satisfies envy-freeness, Pareto efficiency, strategyproofness and the weak sharing incentive property. To implement DRF-CE, we design an algorithm and evaluate its performance via simulations driven by a concrete example and Google cluster traces. Simulation results prove that DRF-CE is superior to traditional approaches in terms of users’ dominant share, resource utilization and the number of tasks performed by each user. Furthermore, the simulation results show that considering bandwidth demand compression can improve user efficiency by approximately 40% and the central processing unit (CPU) utilization by more than 25%.