Hello and thank you for using JustAnswer.com
The dome light flickering can be a few things. A door pin switch could be broken. A door out of adjustment can be it also. I would go around the truck, with all door closed and shake each door to see which door is causing the flicker. Then you'll know which door to look into.
If you have any more questions, please feel free to ask. Thanks Jay!