Doc runs the soda shop where Tony works and the Jets hang out. Like a lot of grown-ups in this film, he's pretty…helpless. The Jets walk all over him, he scuttles away whenever violence is threatened, and even Tony—who appreciates the faith Doc puts in him—is free to ignore the old man's advice.
Doc's aware of this, and seems to have accepted it with a certain amount of grace… and even humor, as when Lt. Schrank busts his chops about it.
LIEUTENANT SCHRANK: Do you mind?
DOC: I have no mind. I am the village idiot.
Doc's self-effacing, but he also kind of means it, knowing how little his words actually sink in. At the same time, his helplessness comes with a lot of hard-won wisdom and cynicism, and he's the only adult in the whole movie who actually seems to care about whether these kids kill each other or not.
Doc gives ex-gang leader Tony a shot at a better life, and Tony works hard for him. There's a father-son vibe in their relationship, and he tries to warn Tony away from trouble. He also tries to warn him against falling in love with Maria; he sees how complicated and dangerous that could be. Like everything else, his words fall on deaf ears.
DOC: Tony, things aren't tough enough?
TONY: Tough? Doc, I'm in love!
DOC: And you're not frightened?
TONY: Should I be?
DOC: No. I'm frightened enough for both of us.
Tony comes to Doc after he kills Bernardo, and Doc scrapes up some money to help him and Maria get out of town. And after Anita tells him (falsely) that Maria's dead, his heart sinks:
DOC: When do you kids stop? You make this world lousy.
Doc's the one to have to break the bad news to Tony:
TONY: You're a pal! You're the best friend a guy ever had. I'll pay you back as soon as l can, l promise.
DOC: Forget that.
TONY: Never. l couldn't. Doc, you know what we're gonna do in the country, Maria and me? We're gonna have lots of kids, and we're gonna name 'em after ya. That way, when you come to visit us—
DOC: (Slaps Tony) Wake up! Is this the only way to get through to you? Fight like all you kids do? Bust like a hot water pipe
TONY: What's got into you?
DOC: Why do you kids live like there's a war on? Why do you kill?
TONY: I told you how it happened. Maria understands. I thought you did, too.
DOC: Maria understands nothing. Never again. There is no Maria. I…can't—
TONY: No, Doc. Tell me!
You can see how it kills Doc to have to tell Tony his beloved Maria is dead. He's a supremely decent guy, and Tony's devotion to Maria seems to have almost convinced him that things might go right in some small corner of this terribly wrong world.
But in the end, his cynicism's borne out and Tony's hope is crushed.