Onionhead (1958)
Onionhead is a 1958 comedy-drama film set on a U.S. Coast Guard ship during World War II, starring Andy Griffith and featuring Felicia Farr, Walter Matthau, Erin O'Brien, James Gregory, "Rat Pack" comedian Joey Bishop, and Claude Akins. It was directed by Norman Taurog and was written by Nelson Gidding and Weldon Hill from Hill's novel. "Weldon Hill" was the pseudonym of William R. Scott, a native Oklahoman who based the novel on his own World War II service in the Coast Guard.
More at Wikipedia.