My dog is so jealous of my son

J

My son is 7 months old and my dog is still not warmed up to him. When he was younger my dog would try and lay on top of him when I was giving him attention like "no give ME attention" and I would yell him off and then give him loves. He kind of has been passive aggressive this whole time never really actually being physically aggressive just trying to stake his claim with body language. Well he is still doing this, for example, I have bought this dog every kind of dog bed known to man and he hates them ALL he prefers to lay on the ground. Period. That's what he likes. Well in the baby play area I am trying to establish a strict "off the rug" rule because his hair gets EVERYWHERE. This wouldn't be an issue if I bought the rug FOR him since he hates laying on anything. He simply lays on it becsuse it's the baby's and he is seeking attention. I give him plenty of one on one attention. I treat him when he obeys. Well today he was laying in the baby's teepee which I was telling him "off" and he was by listening then as my son got closer he growled. Needless to say mama bear came out and I picked him up and put him off the rug and yelled at him and told him bad dog go lay down. Anyhoo, I don't really know how to go about fixing this problem so I'm seeking advice on the subject of getting pup used to baby. Hes not a bad dog by any means but is very jealous of my son.