Ubuntu 18.04 docker安装php + mysql + ngixn 指南
安装docker
apt-get update && apt-get upgrade
apt install docker.io
使用国内源
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://7r1xoz0i.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
安装docker-compose
curl -L "https://get.daocloud.io/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
搭建 php + mysql + ngixn 环境
git clone https://gitee.com/ninedo/docker-ubuntu-php-mysql-nginx.git
cd docker-ubuntu-php-mysql-nginx
docker-compose up