系统相关
首页 > 系统相关> > Centos安装Docker、DockerCompose

Centos安装Docker、DockerCompose

作者:互联网

后续更新链接

1.更新系统

yum update -y

2.安装docker

yum install -y yum-utils

yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

yum install docker-ce docker-ce-cli containerd.io -y

systemctl start docker

3.安装docker-compose

版本查看地址 https://github.com/docker/compose/releases

wget -c -t 0 https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` -O /usr/local/bin/docker-compose

chmod a+rx /usr/local/bin/docker-compose

docker-compose -v

4.阿里云docker加速

https://*****.mirror.aliyuncs.com 需要配置成你的加速地址,阿里云-> 控制台 ->容器镜像服务

mkdir -p /etc/docker

tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://*****.mirror.aliyuncs.com"]
}
EOF

systemctl daemon-reload

systemctl restart docker

标签:compose,DockerCompose,Centos,ce,yum,https,docker,com,Docker
来源: https://blog.csdn.net/yp090416/article/details/120646558