Couple of things to look at
Is the cap of the reservois bottle breathing correctly ?
Any brake hoses kinked ?
Is it doing it all the time ?
Once the system becomes pressurised you need to find out where the pressure is held by cracking open some of the joints.
If you undo the bleed nipple and it fixes it the pressure is in the caliper, if you undo the brake hose the pressure is in the line, and if you undo the reservois end the pressure is in the master cylinder.
Only then can you start to work out whats happening where