Giter VIP home page Giter VIP logo

nginx-php7's Introduction

Nginx and PHP7.4 for Docker

English | 简体中文

Last Version

NGINX: 1.19.2
PHP: 7.4.10

Docker Hub

Nginx-PHP7: https://hub.docker.com/r/skiychan/nginx-php7

Documents

Build

git clone https://github.com/skiy/nginx-php7.git
cd nginx-php7
docker build -t nginx-php7 .

Installation

Pull the image from the docker index rather than downloading the git repo. This prevents you having to build the image on every docker host.

docker pull skiychan/nginx-php7:latest

To pull the develop Version:

docker pull skiychan/nginx-php7:dev

Running

To simply run the container:

docker run --name nginx -p 8080:80 -d skiychan/nginx-php7

You can then browse to http://\<docker_host\>:8080 to view the default install files.

Volumes

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

docker run --name nginx -p 8080:80 -v /your_code_directory:/data/wwwroot -d skiychan/nginx-php7
More
docker run --name nginx -p 8080:80 \
-v /your_code_directory:/data/wwwroot \
-v /your_nginx_log_path:/data/wwwlogs \
-v /your_nginx_conf_path:/data/server/nginx \
-v /your_php_extension_ini:/data/server/php/ini \
-v /your_php_extension_file:/data/server/php/extension \
-d skiychan/nginx-php7

Enabling Extensions With Source

Add ext-xxx.ini to folder /your_php_extension_ini, source /your_php_extension_file. then run the command:

docker run --name nginx \
-p 8080:80 -d \
-v /your_php_extension_ini:/data/server/php/ini \
-v /your_php_extension_file:/data/server/php/extension \
skiychan/nginx-php7

/your_php_extension_ini/ext-xxx.ini file content:

extension=mongodb.so

/your_php_extension_file/extension.sh file content:

curl -Lk https://github.com/swoole/swoole-src/archive/v4.4.14.tar.gz | gunzip | tar x -C /home/extension && \
cd /home/extension/swoole-src-4.4.14 && \
/usr/local/php/bin/phpize && \
./configure --with-php-config=/usr/local/php/bin/php-config && \
make && make install

License

This project is licensed under the MIT license.

Thanks

JetBrains

nginx-php7's People

Contributors

redheatwei avatar yuyangame avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.