- 安装docker,参考docker官网:点击进入
- 安装docker-compose
安装官网比较慢,选择离线安装(推荐)
离线包地址:https://github.com/docker/compose/releases
下载后,存放在目录:/home/ubuntu
root@VM-0-12-ubuntu:/home/ubuntu# ls
docker-compose-Linux-x86_64
移动到bin目录,并修改权限
root@VM-0-12-ubuntu:/home/ubuntu# mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
root@VM-0-12-ubuntu:/home/ubuntu# chmod +x /usr/local/bin/docker-
检查是否安装成功
root@VM-0-12-ubuntu:/home/ubuntu# docker-compose version
docker-compose version 1.26.2, build eefe0d31
docker-py version: 4.2.2
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
OK