Building a chicken run?

  I am building a run for my chickens that goes around their coop. I live near a forest and don't want to risk having animals such as foxes or raccoons burrow into the run. I was going to build it out of chicken wire and wooden stakes, and was wondering how deep into the ground should the chicken wire be to keep out predators? Any other comments or suggestions would be appreciated as well!:)
You can buy electric fencing (costs $ 200) but the fencing will have to be at least half a meter deep. Also you need to watch the foxes don't climb over the fence. Fold some wire over at the top so they can't get up. Also you can put fox deterrents out.