Tech Note · 2023-04-01 0

新机器一分钟安装docker和docker compose

新机器一分钟安装docker和docker compose

本条仅做一个命令整合

1  sudo yum install -y yum-utils
2  sudo yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo
3   sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
4  sudo systemctl start docker
5  sudo docker run hello-world
6  sudo curl -L https://github.com/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
7  sudo chmod +x /usr/local/bin/docker-compose
8  docker-compose --version
9  history

官网文档指路:
https://docs.docker.com/engine/install/centos/
https://docs.docker.com.zh.xy2401.com/v17.12/compose/install/#uninstallation