Machine self-adjusts to container sizes