I am trying to run a few commands in my own Nginx container I create from a compose yml file.
Basically, I do the tail -f command simply to keep the container running. And then I also want to start the Nginx and php-fpm service.
My compose file only seems to run the tail -f command, and the start nginx and php-fpm commands dont seem to run. I always have to exec into the container and run those commands manually myself.
Normally you would put this kind of stuff in a separate file, and use that as entrypoint.
Have you seen that there is allready a php-apache image?
But, the problem you have here is that you put tail -f /dev/null first, the thing with && is that it means “when the command is finished successfully then next command”
and tail -f /dev/null never ends, so try and put it in the end instead, but im not sure that it will 100% work