When installing a program through yum, many temporary files will be generated, and many software packages that are not necessarily needed will be installed as recommended software, so the image will naturally become larger.
In addition, it is best not to run all programs in one container, but to build services through container orchestration.
You are using the docker container as a virtual machine. This is incorrect usage. You should use Dockerfile to make the image and follow the best principles for writing Dockerfile. For lnmp’s Docker container production, please refer to https://www.centos.bz/2017/02...
You made the image based on the centos system image, which is equivalent to bundling several images together, so it becomes larger. One program has one image, and then communicates, so it will not be too big.
When installing a program through yum, many temporary files will be generated, and many software packages that are not necessarily needed will be installed as recommended software, so the image will naturally become larger.
In addition, it is best not to run all programs in one container, but to build services through container orchestration.
You are using the docker container as a virtual machine. This is incorrect usage. You should use Dockerfile to make the image and follow the best principles for writing Dockerfile.
For lnmp’s Docker container production, please refer to https://www.centos.bz/2017/02...
You made the image based on the centos system image, which is equivalent to bundling several images together, so it becomes larger. One program has one image, and then communicates, so it will not be too big.