Stretching his neck out when you open the lid sounds like he's just curious. They can't actually strike if their neck is extended like that, they need to have some s-curve to spring forward from.
It's also entirely possible that his previous owner handled him often, and so he's expecting to come out and wander around when you open the lid and he doesn't smell food. If he seems relaxed and curious and happy to come out, I'd say take him out and let him hang out for awhile. If he really is used to being handled and being out and about, he won't bite when you reach for him.

If you're nervous about being bitten, keep in mind that you are many many times his size and he actually can't possibly do any real damage no matter how hard he ever tried.