Coder Social home page Coder Social logo

docker-lnmp's Introduction

docker-lnmp

启动和停止

进入该文件夹,启动命令为docker-compose up 后台运行加 -d

可以设置命令别名 alias dcup='docker-compose up -d --remove-orphans' remove-orphans 参数会移除多余创建的容器,在自行修改容器配置后使用更佳

结束命令为docker-compose stop

启动后的demo页

启动后可以打开三个页面

  • / nginx默认页面
  • /index.php 会显示php7.2容器的php_info()相关信息
  • /lua 会展示lua的应用

更新说明

2019-06-15 更新

  • 替换nginx容器为openresty
  • default.conf文件增加lua 简单示例代码

2018-09-29 更新

  • 增加xdebug功能,需要重新生成镜像,默认端口为9100
  • 暴露php7.2的配置文件方便修改
  • 去掉php映射外部接口

2018-08-17 更新

2018-08-14 更新

  • 增加容器时区同步设置,和容器错误重启功能
  • 时区设置的两种方式

environment:
      - TZ=Asia/Shanghai

or

volumes:
  - /etc/localtime:/etc/localtime:ro
  - /etc/timezone:/etc/timezone:ro

2018-08-07 更新

  • 增加Ubuntu18.04安装docker清华源脚本,和docker-compose使用

2018-02-26 更新

  • 添加php镜像cron功能,供laravel使用

2017-12-04 提交

  • 更新内容:添加nginx和php之间的关联 links,与mysql和redis连接可参考php与nginx

注:安装php mongodb redis(其他)模块

  • docker ps -a 查看php容器的id
  • docker exec -it 容器id bash   进入 命令行
  • 执行apt -y update && apt install -y libssh-dev  安装必要的包
  • 进入/usr/local/bin, 执行pecl install mongodb && docker-php-ext-enable mongodb
  • pecl install redis-3.1.0 && docker-php-ext-enable redis

安装mysql扩展

  • docker-php-ext-install pdo_mysql

查看rabbitmq队列

  • http://localhost:15672
  • 账号密码默认guest,guest

docker_php官方文档 https://hub.docker.com/_/php/

docker-lnmp's People

Contributors

linkkong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

darifo

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.