Welcome to the fold
First off, you should try and keep the plant potted, not in ground, if your landscape allows. This gives you more control over watering and soil conditions, and protects you from things like gophers. A 15 gallon pot is more than enough for a dragon fruits entire life span. Secondly, how you grow it is going to depend on where you plan on putting it, and what sort of area that is. Up against a fence? Middle of the yard? Stuff like that. The traditional route is to grow these up a post of some sort, up and through an elevated ring or support, which takes the load of the plants eventual weight, and grow them in an umbrella-like canopy. 1-3 main stems are trained up the post, using gardeners tape or burlap rope, with the remaining side growth trimmed away, and as the stems get to the required height, they are topped, or cut, to prevent further growth on those stems. This forces the plant to start producing side branches again, but at the top of the plant (hopefully). These are trained up though and over the support on top, and then allowed to hang back down. Hanging branches produce more fruit, with it having something to do with the necessary hormones being pushed further down the branches and collecting there.
There are dozens of good ideas on how to support your fruit, and a quick google or YouTube search (growing dragon fruit) should hopefully yield something you can use in your particular situation. At the end of the day, though, the main idea is to end up with long hanging branches.
As a side note, though, I would suggest that, if you have the space, you consider starting a second plant. Without knowing what variety you have there, you would be best off having a second, clearly different species, for both pollination and general fruit production. Some will produce fruit without a second plant, but unless you know for sure what type you bought, I wouldn't risk it. Waiting a year or two to find out can be a disappointment.
Oh, and as for the roots, these plants tend to grow roots on the surface, not deep, so the best way to go about transplanting would be, if you can, use a box cutter type knife to slit the old pot enough to wedge it open a little, then try and take the entire root ball + soil out in one piece. Make sure the soil is nice and dry, to prevent it from crumbling. Not watering the cactus wont hurt it for even weeks at a time, so you don't have to worry about that. Just make sure when you transplant, wherever it goes, try to keep the top of the old soil even with the new location. Don't try and bury it deep; these plants aren't fond of that.