导读 PHP即“超文本预处理器”,是一种通用开源脚本语言。PHP是在服务器端执行的脚本语言,与C语言类似,是常用的网站编程语言。PHP独特的语法混合了C、Java、Perl以及 PHP 自创的语法。

安装Docker

《Ubuntu安装和配置Docker-CE镜像加速》

准备项目

使用本人的项目 khs1994-docker/lnmp 来作为 LNMP 环境。

安装
$ git clone --recursive https://github.com/khs1994-docker/lnmp.git

# $ git clone --recursive git@github.com:khs1994-docker/lnmp.git

中国镜像
$ git clone --recursive https://code.aliyun.com/khs1994-docker/lnmp.git

# $ git clone --recursive git@code.aliyun.com:khs1994-docker/lnmp.git

启动 Demo
$ cd lnmp

$ ./lnmp-docker up
Windows 10 打开 PowerShell 执行

Windows 10 PowerShell 默认禁止执行脚本,请以管理员打开 PowerShell 执行以下命令解除限制

$ set-ExecutionPolicy RemoteSigned

输入 `Y` 确认

验证环境
$ curl 127.0.0.1

Welcome use khs1994-docker/lnmp v18.09 x86_64 With Pull Docker Image

development
Windows
$ wsl curl 127.0.0.1

原文来自:https://segmentfault.com/a/1190000013364203

本文地址:https://www.linuxprobe.com/php-docker-install.html编辑:向云艳,审核员:逄增宝

Linux命令大全:https://www.linuxcool.com/

Linux系统大全:https://www.linuxdown.com/

红帽认证RHCE考试心得:https://www.rhce.net/