Originally Posted by Apache
I Am Legend by Richard Matheson
I'm assuming the OP wants all the bullet points, and if Matheson hid a spaceship in I Am Legend
he did it well indeed. Offhand the most fitting tale I can think of is The Lifeship
by Harrison and Dickson. Not great by any means, but I recall the claustrophobia after decades. Doesn't really hit point four, though. Fool's War
by Sarah Zettel is a dissimilar novel that hits most of the points, even number four (if you define things very loosely).
by Peter Watts. It's got that "people in a ship with dangerous and scary stuff going on" vibe down pat. The Tartarus Incident
by William Greenleaf is similar, though they get off the ship for most of it, IIRC.