It's immaterial what the box is mounted to. If you are running NM, MC or EMT with a ground conductor it must be bonded to the box. Depending on the receptacle and the cover you may not have to connect the ground screw on the receptacle to the box with a pigtail.