Smart meters connect smart grid electricity suppliers and users. Smart meters have become a research hotspot as smart grid applications like demand response, power theft prevention, power quality monitoring, peak valley time of use prices, and peer-to-peer (P2P) energy trading have grown. But, as the carriers of these functions, smart meters have technical problems such as limited computing resources, difficulty in upgrading, and high costs, which to some extent restrict the further development of smart grid applications. To address these issues, this study offers a container-based digital twin (CDT) approach for smart meters, which not only increases the user-facing computing resources of smart meters but also simplifies and lowers the overall cost and technical complexity of meter changes. In order to further validate the effectiveness of this method in real-time applications on the smart grid user side, this article tested and analyzed the communication performance of the digital twin system in three areas: remote application services, peer-to-peer transactions, and real-time user request services. The experimental results show that the CDT method proposed in this paper meets the basic requirements of smart grid user-side applications for real-time communication. The container is deployed in the cloud, and the average time required to complete 100 P2P communications using our smart meter structure is less than 2.4 seconds, while the average time required for existing smart meter structures to complete the same number of P2P communications is 208 seconds. Finally, applications, the future development direction of the digital twin method, and technology architecture are projected.