Are you referring to a pus-like discharge from the eyes?
Is your dog rubbing at the eyes? How long has this been going on?
It sounds like he may have a conjunctivitis. The green or yellow discharge is a sign that bacteria are involved. There are various causes for conjunctivitis or inflammation of the tissue surrounding the eyes and in dogs it is not usually a contagious condition like we see with kids. It is always a good idea however to wash your hands after you handle his eyes. The inflammation can be secondary to allergies, trauma, irritants, anatomical problems with the lids or lashes or even problems with their tears or tear ducts. There can even be problems with the eye internally like glaucoma that can cause redness on the outside.
I would definitely have a veterinarian examine his eyes as once they get infected they can really get into problems. On top of that, if they are inflammed they are uncomfortable for him. In the meantime, keep any discharge from building up around his eyes by wiping gently with a warm water cloth. You can try flushing his eyes with eyewash or saline solution (like contact wearers use) if they seem to bother him until you can get him in.
I hope this helps and please let me know if you have any further questions.