The computer must be on or asleep before being closed as the power button is not accessible while docked. If the computer is shut down while closed, it must be opened to power it back up. The MacBook can perform a full restart cycle and sleep-wake cycle while closed.
You can use your MacBook either closed or open with the Horizontal or Tethered Docks. The Vertical Docks require the computer to be closed while docked and the built-in display is not accessible.
Please note: There is no way to power on a MacBook without pressing the physical power button on the laptop. The computer itself is only able to be powered on via the power button or, on newer models, by opening the lid.