Yum安装Docker容器
1、yum安装docker部分yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install docker-ce -y
systemctl enable docker
systemctl start docker
2、建立减速目录脚本
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://xxx.mirror.aliyuncs.com"]我用的阿里的加速器
}
EOF
3、docker安装nginx镜像
docker search nginx 查询
docker pull nginx:latest 拉取最新的
至于mysql、php等都类似一样的操作,可以先试试有问题跟帖吧!!
这是干货,我学习来了。
页:
[1]