Server with NGINX + PHP 7.1.16. php-fpm based on Alpine Linux
Requirements: Install docker: https://docs.docker.com/install/
docker build -t alpine-nginx:0.01 .
To simply run the container:
docker run -d -p 8080:80 alpine-nginx:0.01
Test the container:
curl http://localhost:8080/
If you want to link to your web site directory on the docker host to the container run:
docker run --name alpine-nginx -p 8080:80 -v /public:/var/www/html -d alpine-nginx:0.01
If you have problems with nginx permissions ("/var/www/html/index.php" is forbidden (13: Permission denied))
Try:
docker exec -ti alpine-nginx bash
chown -R nginx:nginx /var/www/html/