Submarine Command, 1951. Starring William Holden. This movie, which started with the end of World War Two and ended during the opening days of the Korean War, was actually shot for the most part aboard a submarine so you get to see the close quarters that sub crews lived and fought in. Lots of footage of fleet boats on the surface and in the Mare Island mothball fleet, and even a bit of carrier footage for good measure.
The movie follows the Executive Officer of the sub who assumes command as the skipper is lost in action on the last day of WW2. He tries to make a go of it staying in the Navy but has issues dealing with memories of what happened. In that aspect, it's one of the first movies to address the issue of PTSD among war vets. But just as the hero plans to resign from the Navy, war breaks out in Korea and he's reassigned to his old sub and given a dangerous secret mission.
Far be it from me to give away the ending. If you really like submarines, you need to find this one. Amazon's got it. It gets four paws up, just for the sub scenes. Here's the opening.