centos 安装docker-ce、docker compose

 

yum remove docker \
          docker-client \
          docker-client-latest \
          docker-common \
          docker-latest \
          docker-latest-logrotate \
          docker-logrotate \
          docker-engine

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 docker-buildx-plugin docker-compose-plugin

# set data-root
# /etc/docker/daemon.json

{
  "data-root":"/home/docker"
}

systemctl start docker

参考:https://docs.docker.com/engine/install/centos/

posted @ 2023-07-07 11:00  JeromePowell  阅读(6)  评论(0编辑  收藏  举报