Supersolid edge and bulk phases of a dipolar quantum gas in a box