The youngsters were given a tour of the £1bn state-of-the-art destroyer during a rare trip onto the ship.
Children took to Dragon’s bridge and were shown some of the vessel’s hi-tech gadgets and equipment used to keep the ship safe at sea.
Some of the pupils even had a chance to sit in the captain’s chair.
The visit was staged by MoD Gibraltar while Dragon was stationed at the British territory earlier this month.
Writing on Twitter, MoD Gibraltar said: ‘St Bernard's School were invited onboard @HMSDragon as part of their studies.
‘Everyone including the teachers thoroughly enjoyed the tour. The school kindly sent a thank you cake to the crew which was so delicious it was eaten before a photo could be taken.’
The operation, called Exercise Polaris 21, involves some 26 warships and 6,000 personnel.
Taking place across parts of the Mediterranean and the Atlantic, the drill is designed to test naval units in every aspect of warfare, from attacks at sea and land to defending against aerial assault.