|Left: A 1300BC depiction of the sun-battling snake, holding its tail in its mouth, aka Ouroborus, encircling the sun disc, which is in the form of Khepri; the tail biting snake later described by Plato, in his Timaeus (c.360BC) (Ѻ), as the first living thing. A newer Asian-like derivative (Ѻ) of the ouroboros.|
In c.3000BC, the cobra goddess Wadjet, whose main cult center was in Buto (Tell el-Barian), was being depicted as the snake that coils around the sun disc to symbolized Ra's powers of destruction; sometimes depicted as a fire-breathing snake. 
In later times the Uraeus (Ѻ), or upright “rearing cobra”, with or without the sundisc, became the symbol of Wadjet, as worn on the crown of the pharaohs in the 18th dynasty.
In 1300BC, and into the 19th and 20th dynasties, Theban priests penned a burial text called the Book of Pylons (Book of Gates), in an attempt to adjust the cult of Ra to the Osiris cult, in which, as depicted on the alabaster sarcophagus of Seti I (1279BC), as shown below, in the scene of the ‘first hour of night’, the solar barque sails in a mythical river, containing the sun disc containing a morning scarab beetle, aka morning sun version of Ra (Khepri) which is encircled by a huge serpent holding its tail in its mouth; as shone below
Or as found in the original diagram: 
In 1995, German-Egyptian dictionary writer Rainer Hannig argued that the Mehen (mḥn), a protective deity who is depicted as a snake which coils around the sun god Ra during his journey through the night, is equivalent to the Ouroboros.  This conjecture, however, seem to be off, being that Mehen, the vertical snake depicted above diagram from the Book of Pylons, as described in detail by Budge (pgs. 178-82), is one of several snakes described, including Apep, the one that does battle with Ra at night, a number of uraesus, with shooting balls of fire coming from their mouths, and the one encircling the Khepri-Ra sundisc in the boat.
In 1100BC, in the Papyrus of Dama (c.1077-943BC), a snake, surrounding the sun (Re) or pharaoh as sun, biting its tale, is shown as follows: 
In 380BC, Greek philosopher Plato was speaking of the ouroboros as so-called first living thing. 
In 1909, English radiochemist Frederick Soddy referred to the ouroboros myth as a symbol of cyclic and ever-regenerative cosmic processes. 
In 1988, American physicist Ronald Fox, in his Energy and the Evolution of Life, was referring to the "uroboros puzzle", visually depicted below, as the fundamental issue of how a state of no-life or non-life transitioned into proto-life and life, particularly in respect to "energy". 
It is likely the case that the "dragon" depiction is a confabulation of the Herodotus "phoenix" depiction Ra, the sun bursting forth out of the mound (Nun), as the primordial origin of everything, and the the snake coiled around the sun disc.
1. Fox, Ronald F. (1982). Biological Energy Transduction: the Uroboros. Wiley.
2. Fox, Ronald F. (1988). Energy and the Evolution of Life (pg. 5). New York: W.H. Freeman and Co.
3. Ouroboros – CrystalLinks.com.
4. (a) Hannig, Rainer. (1995). Die Sprache der Pharaonen: Großes Handwörterbuch Ägyptisch-Deutsch (The language of the Pharaohs: Large Pocket Dictionary of Ancient Egyptian and German). Publisher.
(b) Mehen – Wikipedia.
5. Kragh, Helge S. (2008). Entropic Creation: Religious Contexts of Thermodynamics and Cosmology (pg. 178). Ashgate Publishing, Ltd.
6. Budge. Wallis. (1904). The Gods of the Egyptians, Volume One (pgs. 179-80). Dover, 1969.
7. Jordan, Michael. (1993). Encyclopedia of Gods: Over 2,500 Deities of the World (pgs. 219-20, 286). Facts on File, Inc.
● Bejan, Adrain and Mamut, Eden. (1999). Thermodynamic Optimization of Complex Energy Systems (pgs. 223-24). Springer.
● Ouroboros – Wikipedia.