So realistically, tank doctrine still involves the commander sticking his head out of the hatch for a good chunk of actual tank operation, because him being able to see shit properly is just that important, regardless of how good the various cameras and periscopes have gotten. So a rifle couldn't do much to a tank, but it could absolutely splatter the most trained and important guy (halfway) inside the tank, and leave the remaining guys traumatized, without a leader and effectively blind.Rifle? Not much. A shovel and a bottle of gasoline with a rag on the end of it will do a lot.
Rifle is for very angry people jumping out of the tank