Even though this has been answered, I wanted to visualize this interesting problem. If we assume light travels in straight lines, then the wall thickness and hole diameter both matter.
In these diagrams, the blue lines are the light rays travelling through. The yellow lines are also light rays, but they are not perfectly crossed at the center, so they add blurriness (which may be desirable up to a point).
Ideally, you'll have a small pinhole in a thin wall. This allows the light to cover the film with minimal light interference.
If the wall is too thick, the light doesn't reach the edges of the film, which is what you were seeing.
Making the hole bigger, as one person suggested, will allow the image to cover the whole film, but it adds more blurriness. If you make the hole too big, it's no longer a "pinhole". Too big, and you just get white.
And finally, here's how beveling or countersinking can help with a thick wall.
You probably do want some vignetting, so you'll want to calculate how far to place the film from the pinhole, using diagrams like these. Good luck!