A defense ministry statement blamed the assault on the base in Garabtisan in the north of the small Horn of Africa nation on the "Armed FRUD" (Front for the Restoration of Unity and Democracy), describing it as a "terrorist group."
It was a rare attack in Djibouti, a largely stable and strategically important country in the Horn of Africa.
"Despite the fact that our soldiers defended themselves valiantly, this attack caused the death of seven of our soldiers, wounded four and left six missing," it said in a statement on Friday.
"This gang is well known for its odious and criminal acts of terrorizing and pillaging in remote areas of the country," it said, adding that all efforts were being made to pursue the assailants and find the missing.
There was no update on Saturday from the authorities.
Recruited among the Afar community of northern Djibouti, the FRUD launched a rebellion against the government in 1991, saying it wanted to defend Afar interests against the Issas, the other large ethnic community in the country.
The group later splintered and while the FRUD is a member of the ruling UMP coalition that backs long-serving President Ismail Omar Guelleh, the armed wing remains committed to armed resistance.
FRUD described the attack as "unjustifiable in the current context of political pluralism."
"It is a terrorist act aimed at creating a climate of war and instability in our country," it said in a statement.
The executive secretary of the regional Intergovernmental Authority on Development (IGAD), Workneh Gebeyehu, said he condemned "in the strongest terms possible the criminal and cowardly attack" and called for the culprits to face justice.
Situated on one of the world's busiest shipping routes where the Red Sea joins the Gulf of Aden, Djibouti hosts the only U.S. and Chinese military bases in Africa and the largest overseas French army base.