What are the benefits of docker packaging?

can my friend support horizontal scaling, more than one in a single image?

all talk about horizontal scaling backend, and you extend php as a result lnmp expands all

how do you understand the extensions here?

Mar.31,2021

the use of docker has the following benefits:

1. In the past, in order to ensure the consistency of the local development environment, test environment and online environment is very difficult, often need to build a local virtual machine to simulate online (because the local is developed by window), you know that the virtual machine is very stuck and bulky, while docker is much faster and more consistent. Migrate the image after local development, or update it online, and the principle of expansion is similar.

2. Continuous deployment and testing. Eliminate the environmental differences between online and offline, and ensure the environmental consistency and standardization of the application life cycle. Developers use images to build a standard development environment, and after development is completed, they migrate by encapsulating images of complete environments and applications, so that testers and operators can directly deploy software images for testing and release, greatly simplifying the process of continuous integration, testing and release.


facilitates deployment. The environment is unified


see what your image contains. If you have an image that is used as a web server, it only runs nginx. So after you pack and push to the warehouse, when you scale out the web server, you only need to pull down the finished image, and run can provide services.


I am a sophomore now, and I may not have a deep experience.
now for me, the advantages of docker are
1, unified environment, consistent production environment and online environment
2, convenient level expansion, the expansion php lnmp mentioned by the subject is all expanded, it must be that there is no reason to use docker. The correct use of docker is that php, nginx, and mysql are deployed in one container. If we need to extend a php, then we add a sentence at startup-- scale=3 (as it seems) will start three php containers. It's very convenient. Load balancing is also convenient for many people

3. Convenient CI/CD (not clear if you haven't used it)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37e20-34497.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37e20-34497.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?