Is life used to mean the same thing in the next two sentences?

The life of this milk carton may be thousands of years in this landfill.

There is no life on the moon.
different meanings