标签:curl app reg bin ali reload mirror down config
CentOS7.4 下安装Docker 详细步骤
第一步:安装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 install -y docker-ce systemctl start docker systemctl enable docker docker info
第二步:安装Docker Compose
镜像以及非https的自建镜像源编辑 /etc/docker/daemon.json 文件,其他配置选项使用docker info 查看sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-composudo chmod +x /usr/local/bin/docker-compose
docker-compose --version sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-‘EOF‘ { "registry-mirrors": ["https://yasrs3t5.mirror.aliyuncs.com"],
"insecure-registries": ["192.168.1.152"]
}
EOF
systemctl daemon-reload
systemctl restart docker
第三步:尝试拉取镜像
docker pull centos
docker pull alpine
第四步:尝试运行镜像
docker run --name mysql -i -t centos /bin/bash
标签:curl app reg bin ali reload mirror down config
原文地址:https://www.cnblogs.com/hk7400/p/9347461.html