Giter VIP home page Giter VIP logo

docker-nginx-php74's Introduction

Nginx and PHP for Docker

English | 简体中文

Version

Name Version Docker tag
PHP 8.2.x latest / 8.2
PHP 8.1.x 8.1
PHP 8.0.x 8.0

EOL

Docker tag PHP NGINX

Include extensions

bcmath,Core,ctype,curl,date,dom,exif,fileinfo,filter,ftp,gd,gettext,hash,iconv,intl,json,libxml,mbstring,mysqli,mysqlnd,openssl,pcntl,pcre,PDO,pdo_mysql,pdo_pgsql,pdo_sqlite,pgsql,Phar,posix,redis,Reflection,session,shmop,SimpleXML,soap,sockets,sodium,SPL,sqlite3,standard,sysvsem,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib

Custom extension

Docker Hub

Nginx-PHP: https://hub.docker.com/r/jetsung/nginx-php

Build

git clone https://github.com/jetsung/docker-nginx-php.git

cd nginx-php

docker build --build-arg PHP_VERSION="8.1.1" \
  --build-arg NGINX_VERSION="1.20.0" \
  -t nginx-php:8.1 \
  -f ./Dockerfile .

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 jetsung/nginx-php:latest

Running

To simply run the container:

docker run --name nginx -p 8080:80 -d jetsung/nginx-php

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

docker-compose.yaml

version: "3"
services:
  nginx-php:
    image: jetsung/nginx-php:latest
    ports:
      - "38080:80"

Command line tools

Use docker exec {CONTAINER ID} {COMMAND}

# Current process
docker exec {CONTAINER ID} ps -ef
# Current PHP version
docker exec {CONTAINER ID} php --version

# supervisord
## HELP
docker exec {CONTAINER ID} supervisorctl --help
## STOP, START, STATUS (stop/start/status)
docker exec {CONTAINER ID} supervisorctl stop all
## STOP NGINX / PHP
docker exec {CONTAINER ID} supervisorctl stop nginx/php-fpm

# Container not started
## PHP version
docker run --rm -it jetsung/nginx-php:latest php --version

## NGINX version
docker run --rm -it jetsung/nginx-php:latest nginx -v

License

This project is licensed under the MIT license.

docker-nginx-php74's People

Contributors

jetsung 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.