How to write dockerfile so that when nginx,php-fpm,run has a container, you can start it yourself.

based on the first basic image, the dockerfile,docker run without the first basic image has a container, as shown in the following figure

for the nginx service in the container, the php-fpm service does not start by itself. Can you let it start by itself through the second image of build? how should dockerfile be written? hope the gods will show their support

.

the name of the basic image is: ubuntu-api-pworks:1.0.0

Mar.23,2021

generally speaking, it is better to separate nginx/php, and it is also convenient to expand. If you want to start at the same time, writing dockerfile is only basic. You need to add docker-compose configuration startup command, and finally execute

.
-sharp entrypoint.sh

-sharp 1php-fpm daemon
-sharp 2nginx daemon

then execute [/ bin/bash', 'entrypoint.sh'] directly in cmd or entrypoint of dockerfile. Pay attention to the script path

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-1b368ba-2c04e.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-1b368ba-2c04e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?