84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
在Docker构建镜像时,如何设置程序的自启动?
创建容器时,指定程序自动启动。
如何同时运行多个程序?
比如我自建一个LTMP(Tengine)容器,如何使mysql、Tengine跟随容器的启动而启动?
业精于勤,荒于嬉;行成于思,毁于随。
Configure the Supervisor daemon to start related services!
The program auto-start can be configured when building the image. This has nothing to do with docker
You can set dependencies and manage multiple services in the docker-compose configuration file docker-compose.yml.
When you build the image, add it below the Dockerfile
CMD /etc/bootstrap.sh
Then write the script you want to start. Of course, the file location and file name can be changed
When the container is started, the script you want will be automatically executed
Then you can start the service you want in the script and you are done!
Configure the Supervisor daemon to start related services!
The program auto-start can be configured when building the image. This has nothing to do with docker
You can set dependencies and manage multiple services in the docker-compose configuration file docker-compose.yml.
When you build the image, add it below the Dockerfile
Then write the script you want to start. Of course, the file location and file name can be changed
When the container is started, the script you want will be automatically executed
Then you can start the service you want in the script and you are done!