In the 2009 film 'Moon', the astronaut who discovers he is a clone is Sam Bell.
Sam Bell is played by Sam Rockwell, who portrays both the original human and the successive clones created by Lunar Industries. Bell is stationed alone at Sarang, a lunar facility mining helium-3, an alternative fuel sent to Earth.
Near the end of his three-year contract, Bell finds another version of himself after crashing a lunar rover. The two initially argue over which is the real man, but the station's artificial intelligence, GERTY, eventually reveals the truth: both are clones of the original Sam Bell. Their memories of Bell's wife and daughter have been implanted to make each clone believe he is beginning a normal contract.
A common mix-up is choosing Sam Rockwell, the actor, rather than Sam Bell, the character. GERTY is the station's AI, not the astronaut, while the clone revelation is central to the film's critique of corporate exploitation and manufactured identity.