If you bought two by four width lumber, you will need to build your frame three rows high to a total of 12 inches.
The bed may be contained within a border such as concrete bricks or two by four lumber or merely mounded soil.
Remember, when the doors are retracted, they have to be completely concealed by the adjacent wall or walls.Pocket door frames require the thickness of a two-by-four or greater.