Context. An important goal within the quest for detecting an Earth-like extrasolar planet, will be to identify atmospheric gaseous bio-signatures. Aims. Observations of the light transmitted through the Earth's atmosphere, as for an extrasolar planet, will be the first important step for future comparisons. We have completed observations of the Earth during a lunar eclipse, a unique situation similar to that of a transiting planet. We aim at showing what species could be detected in its atmosphere at optical wavelengths, where a lot of photons are available in the masked stellar light. Methods. We present observations of the 2008 August 16 Moon eclipse performed with the SOPHIE spectrograph at the Observatoire de Haute-Provence (France). Locating the spectrograph's fibers in the penumbra of the eclipse, the Moon irradiance is then a mix of direct, unabsorbed Sun light and solar light that has passed through the Earth's atmosphere. This mixture essentially reproduces what is recorded during the transit of an extrasolar planet. Results. We report here the clear detection of several Earth atmospheric compounds in the transmission spectra, such as ozone, molecular oxygen, and neutral sodium as well as molecular nitrogen and oxygen through the Rayleigh signature. Moreover, we present a method that allows us to derive the thickness of the atmosphere versus the wavelength for penumbra eclipse observations. We quantitatively evaluate the altitude at which the atmosphere becomes transparent for important species like molecular oxygen and ozone, two species thought to be tightly linked to the presence of life. Conclusions. The molecular detections presented here are an encouraging first attempt, necessary to better prepare for the future of extremely-large telescopes and transiting Earth-like planets. Instruments like SOPHIE will be mandatory when characterizing the atmospheres of transiting Earth-like planets from the ground and searching for bio-marker signatures.