The increase in smart grid complexity highlights the need for interdependence analysis between control and communication systems to enhance the cyber-physical system's operational resiliency and robustness. This paper proposes OP-ns3-Dock, a comprehensive cyber-physical framework to address this vital need through seamless multi-domain integration. Opal-rt represents the physical layer, while the cyber layer has been emulated through open-source tools such as Docker containers and Network Simulator 3, considering the minimization of the computational cost of the proposed approach. The framework supports detailed controlcommunication interdependence analysis for smart grid applications with the ability to model and visualize several communication technologies, control architectures, and cyber vulnerability analysis. The effectiveness and scalability of the introduced framework in enabling the interdependence analysis have been validated experimentally through practical applications, focusing on the inverter-based microgrid control and the energy management of multi-microgrid systems, including the cyber and physical layers interactions.