The mean-field theory of dilute spin-glasses is studied in the limit where the average coordination number is finite. The zero-temperature phase diagram is calculated and the relationship between the spin-glass phase and the percolation transition is discussed. The present formalism is applicable also to graph optimization problems.