项目作者: panttojo

项目描述 :
Server with NGINX + PHP 7.1.16. php-fpm based on Alpine Linux
高级语言: Shell
项目地址: git://github.com/panttojo/alpine-nginx-php-fpm.git
创建时间: 2018-05-10T21:12:35Z
项目社区:https://github.com/panttojo/alpine-nginx-php-fpm

开源协议:

下载


alpine-nginx-php-fpm

Server with NGINX + PHP 7.1.16. php-fpm based on Alpine Linux

Requirements:
Install docker: https://docs.docker.com/install/

Build image

  1. docker build -t alpine-nginx:0.01 .

Run the container

To simply run the container:

  1. docker run -d -p 8080:80 alpine-nginx:0.01

Test the container:

  1. curl http://localhost:8080/

Volumes

Website directory

If you want to link to your web site directory on the docker host to the container run:

  1. docker run --name alpine-nginx -p 8080:80 -v /public:/var/www/html -d alpine-nginx:0.01

NGINX forbidden

If you have problems with nginx permissions (“/var/www/html/index.php” is forbidden (13: Permission denied))

Try:

  1. docker exec -ti alpine-nginx bash
  2. chown -R nginx:nginx /var/www/html/