A truck bomb has exploded near an army compound in the center of the Afghan capital killing at least eight people and wounding close to 200, police and health ministry officials said.