Nowadays, all cloud platforms support the live migration technology of Docker containers, which plays an important role in improving the stability and quality of services. In this article, we will use the JNLP algorithm to determine which migration method to use in pre-copy and post-copy based on the actual network bandwidth and real-time monitoring of memory changes. Moreover, this article analyzes the storage mechanism of docker containers, using the hierarchical structure of docker to reduce the data that needs to be transferred during migration, thereby reducing the total migration time. Experimental results show that the live migration technique proposed in this paper is more general and reduces container data migration time by 40% and total migration time by 30% compared with state-of-the-art techniques.