Some organizations have rules of thumb of 18-Inches, perhaps in the belief that the joint somehow damages the pipe but I don't know if there is any science that supports that.
The bolts on 8-Inch pipe require 5-Inches of clearance to install. So you can use a 12-Inch long pipe spool as a minimum.
It does depend somewhat on the particular manufacturer's joint that you are using, but the megalug joint for example does not transmit radial forces onto the pipe. EBBA Iron states that the thrust load is primarily longitudinal.
Here is a brochure describing the history of the megalug for ductile iron pipe:
The wedges on the megalug are typically 4 to 5-inches apart which gives an indication of the zone of influence of the restraint on the pipe.
EBBA Iron also states that the joint does not damage the pipe:
"All of these tests prove that the 2000PV design works and the product does not damage the pipe in any way. Pipe that has been tested with the 2000PV can actually perform better than pipe without joint restraint. The long term tests at elevated pressures prove there is no immediate or long term damage to the pipe. Cyclic testing provides an accelerated method of determining
whether or not an attachment will cause premature failure of the pipe. The cyclic testing done on the 2000PV proves that there is no damage done to the pipe by utilizing the 2000PV as a joint restraint system."
If you were using a different brand than megalug, it is probably best to call the manufacturer of the restraint that you plan to use and get technical advice.