All Projects → duiying → Docker Lnmp

duiying / Docker Lnmp

利用 Docker-Compose 编排 LNMP 开发环境

Projects that are alternatives of or similar to Docker Lnmp

Baota
宝塔Linux面板 - 简单好用的服务器运维面板
Stars: ✭ 3,163 (+1816.97%)
Mutual labels:  lnmp
resource
后端随笔记录(持续更新中......)
Stars: ✭ 19 (-88.48%)
Mutual labels:  lnmp
Centminmod
CentOS Shell menu based Nginx LEMP web stack auto installer (GPLv3 licensed)
Stars: ✭ 519 (+214.55%)
Mutual labels:  lnmp
learning-docker
Docker 入门指引及相关资料整理
Stars: ✭ 22 (-86.67%)
Mutual labels:  lnmp
Vagrantfile
Vagrant 配置示例
Stars: ✭ 50 (-69.7%)
Mutual labels:  lnmp
JadeDock
🐳 使用 Docker 快速部署简易的 Ngixn + PHP + MySQL + Redis 环境(可开发、可线上运行)
Stars: ✭ 146 (-11.52%)
Mutual labels:  lnmp
Lnmp
LEMP stack/LAMP stack/LNMP stack installation scripts for CentOS/Redhat Debian and Ubuntu
Stars: ✭ 2,488 (+1407.88%)
Mutual labels:  lnmp
Docker
最新lnmp环境,包含php, java,nginx, mysql, go, node, mongodb, openssh server, redis, crond xhprof,maven等服务
Stars: ✭ 120 (-27.27%)
Mutual labels:  lnmp
lnmp-dockerfiles
基于CentOS使用Docker搭建php7.2,nginx1.12,redis4.0,mysql5.7,swoole latest
Stars: ✭ 63 (-61.82%)
Mutual labels:  lnmp
Lnmp
💻 🐳 🐘 🐬 🐧 🚀 Start Docker LNMP(LEMP) In less than 2 minutes Powered by Docker Compose. 让 PHP 开发者快速(一键)搭建基于容器技术(Docker、Kubernetes)的开发、测试、生产(CI/CD by Drone)环境.
Stars: ✭ 341 (+106.67%)
Mutual labels:  lnmp
Http-Developers
⛵️⛵️个人使用基于Docker的PHP&JAVA本地开发环境
Stars: ✭ 18 (-89.09%)
Mutual labels:  lnmp
docker lnmp
一键部署基于docker的LAMP环境,并利用electron + vue 提供gui管理。+++ 可配置的多进程php扩展安装
Stars: ✭ 37 (-77.58%)
Mutual labels:  lnmp
Lnmp
Support: Nginx 1.12/1.13 + MySQL 5.5/5.6/5.7/8.0(MariaDB 5.5/10.0/10.1/10.2/10.3) + PHP 5.4/5.5/5.6/7.0/7.1/7.2 + phpMyAdmin(Adminer)
Stars: ✭ 262 (+58.79%)
Mutual labels:  lnmp
LEMPer
LEMPer Stack is terminal-based LEMP / LNMP installer and manager for Debian & Ubuntu cloud or virtual server (vps) and on-premise (bare metal).
Stars: ✭ 171 (+3.64%)
Mutual labels:  lnmp
Docker Lemp
🐳 Docker 快速搭建 LEMP 开发环境
Stars: ✭ 87 (-47.27%)
Mutual labels:  lnmp
Lnmp Docker
Docker for LNMP (CentOS7 + Nginx + MariaDB + PHP7 + Redis + Supervisor + WebSocket + Cron)
Stars: ✭ 221 (+33.94%)
Mutual labels:  lnmp
lnmp-k8s
Deploy Kubernetes on Linux(systemd or Fedora CoreOS) | Deploy LNMP On Kubernetes
Stars: ✭ 53 (-67.88%)
Mutual labels:  lnmp
Oneinstack
OneinStack - A PHP/JAVA Deployment Tool
Stars: ✭ 1,983 (+1101.82%)
Mutual labels:  lnmp
Jadedock
使用 Docker 快速部署简易的 Ngixn + PHP + MySQL + Redis 环境(可开发、可线上运行)
Stars: ✭ 109 (-33.94%)
Mutual labels:  lnmp
Slickstack
SlickStack is a free LEMP stack automation script written in Bash designed to enhance and simplify WordPress provisioning, performance, and security.
Stars: ✭ 311 (+88.48%)
Mutual labels:  lnmp

Docker-LNMP

利用 Docker-Compose 编排 LNMP 开发环境

清单

  • PHP 7.2
  • Nginx
  • MySQL 5.6
  • Redis
  • phpMyAdmin
  • phpRedisAdmin

目录结构

Docker-LNMP
|----docker                             Docker 目录
|--------config                         配置文件目录
|------------proxy                      Nginx 配置文件目录
|--------files                          DockerFile 文件目录
|------------cgi                        php-fpm DockerFile 文件目录
|----------------Dockerfile             php-fpm DockerFile 文件
|----------------docker-entrypoint.sh   php-fpm 启动脚本
|------------proxy                      Nginx DockerFile 文件目录
|----------------Dockerfile             Nginx DockerFile 文件
|----------------docker-entrypoint.sh   Nginx 启动脚本
|--------log                            日志文件目录
|------------cgi                        php-fpm 日志文件目录
|------------proxy                      Nginx 日志文件目录
|----www                                应用根目录
|--------index.php                      PHP 例程
|----README.md                          说明文件
|----docker-compose.yml                 docker compose 配置文件(完整版: LNMP + Redis + phpMyAdmin + phpRedisAdmin)

准备

# 安装 Docker 和 Docker-Compose
yum -y install epel-release 
yum -y install docker docker-compose

# 启动 Docker 服务
service docker start

# 配置阿里云 Docker 镜像加速器(建议配置加速器, 可以提升 Docker 拉取镜像的速度)
mkdir -p /etc/docker
vim /etc/docker/daemon.json

# 新增下面内容
{
    "registry-mirrors": ["https://8auvmfwy.mirror.aliyuncs.com"]
}

# 重新加载配置、重启 Docker
systemctl daemon-reload 
systemctl restart docker 

安装

# 克隆项目
git clone https://github.com/duiying/Docker-LNMP.git
# 进入目录
cd Docker-LNMP
# 容器编排(使用加速版,推荐,耗时约 10 分钟)
docker-compose -f docker-compose-fast.yml up -d

测试

执行成功

Creating cgi ... done
Creating proxy ... done
Creating mysql ...
Creating phpmyadmin ...
Creating phpredisadmin ...
Creating cgi ...
Creating proxy ...

访问 IP,效果图如下(可能需要等几秒钟):

学习文档

可能遇到的问题

# Error 信息
ERROR: for mysql  Cannot start service mysql: endpoint with name mysql already exists in network docker-lnmp_default
# 解决方案
这是由于端口被占用,需要清理此容器的网络占用
格式:docker network disconnect --force 网络模式 容器名称
docker network disconnect --force docker-lnmp_default mysql
检查是否还有其它容器占用
格式:docker network inspect 网络模式

更新日志

  • cgi 容器支持 crontab
  • PHP 支持 rdkafka 扩展
  • PHP 支持 POSIX、PCNTL 扩展
  • 新增学习文档

Docker 常用命令

# 删除所有容器
docker rm -f $(docker ps -aq)  
# 删除所有镜像
docker rmi $(docker images -q)

参考

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].