I have to create a Dockerfile which has to inherit FROM centos:7 by definition and install nginx and php and get it to show a PHP file.
FROM centos:7 EXPOSE 80/tcp RUN yum -y update RUN yum -y install epel-release RUN yum -y install nginx php php-fpm RUN echo '<?php phpinfo();' > /var/www/demo/index.php
- How can I make docker understand that nginy has to start when the container is created and started?
- How do I make nginx understand to use PHP?
For 1. all I know is that this is not possible with docker build.
For 2. I wanted to use tutorials but those are all wrong, because:
- there is no
- there is no file called
snippets/fastcgi-php.confat any place to include in the nginx.conf
I have never worked with nginx before, so I have no idea where to start. No tutorial I found works, because all those files and folders don't exist. All I get is a 403 error page.