The attack did not cause any casualties, Gen. Abdul Hamid said, RT reported.
The shooter was taken into custody after the Tuesday morning incident and is now being questioned.
The NATO-led coalition has confirmed an attack in Southern Afghanistan, adding that the Afghan army is taking the lead in securing the scene.