Rocky first shows up in Incredibles 2, searching the Parr family's trash bins. Jack-Jack, having been watching old movies in the living room, sees on the television that the bad burglar has on a black mask, similar to the color pattern of Rocky's eyes.
Jack-Jack then thinks that means Rocky is a bad guy, and he uses his intangibility to sneak outside and confront Rocky. Rocky attempts to attack Jack-Jack, not knowing that Jack-Jack has powers, which gives Rocky more than it bargained for with Jack-Jack's newfound set of powers.
This leads to them having a lengthy battle while Bob lies on the couch, the fight being unbeknowst to him.