There were a few. The first one was at the end of The Avengers, when Thanos's servant reported the defeat of the Chitauri army by the Avengers and said that invading Earth would be "courting death," which a CGI Thanos smiled at, as a play on the comics' Thanos being in love with the embodiment of Death, so naturally he'd want to court her. His first significant appearance, and his first played by Josh Brolin (uncredited), was in Guardians of the Galaxy as Ronan's boss and Gamora and Nebula's father, though it was a minor role. Then in the tag scene of Age of Ultron, he was seen clutching the Infinity Gauntlet and saying "Fine, I'll do it myself" after his agents had failed yet again to bring him the Infinity Stones.