Giter VIP home page Giter VIP logo

docker-php's Introduction

Docker化PHP环境

为合适自己的工作和开发环境而打造,for ninja911

使用 docker-compose 快速搭建php环境

环境构成

php-fpmnginx 容器分开,通过 php:9000 端口通信

php

php镜像来自官方 php:fpm,目前最新稳定版本是 7.2.8

在此基础上添加了以下等扩展:

  • swoole-4.0.3
  • redis/hiredis
  • mysqli
  • pdo_mysql
  • mongodb
  • GD
  • memcached
  • ...

手动添加了 composer 并替换了国内源,修改了时区(Asia/Shanghai

nginx

直接使用的 nginx:latest 镜像,需要挂载自己的PHP项目工作目录,并配置nginx/conf.d里各个站点

mongodb

直接使用的 mongodb:latest 镜像,根据具体情况修改 /data/mongodb 本地映射的数据库文件夹,如不需要可注释掉,其他数据库同理。 Windows 磁盘是NTFS/FAT32,不支持Ext4大文件,不能挂载,需要注释挂载, Windows下无解

运行

$ cd docker-php/
// 后台运行
$ docker-compose up -d
// 进入php容器bash环境
$ docker-compose exec php bash

docker-php's People

Contributors

opso-code avatar zhangmazi avatar

Watchers

James Cloos avatar lincoo 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.