安装docker和docker-compose
环境:centos7,参考官方文档:https://docs.docker.com/insta...
第一步:删除旧版本和相关依赖,运行命令:
yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
第二步,安装依赖,命令:
yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
第三步,配置稳定的repositories,命令:
yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
第四步,安装docker,命令:
yum install docker-ce docker-ce-cli containerd.io
完成后通过docker version命令看到docker信息:
启动:systemctl start docker
开机启动:systemctl enable docker
接下来安装docker-compose,运行命令:
curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
给docker-compose执行权限,运行命令:
chmod +x /usr/local/bin/docker-compose
检查,运行docker-compose --version,如下:
至此,docker和docker-compose安装成功;
docker参考文档:
https://docs.docker.com/get-s...
docker-compose文档:
https://docs.docker.com/compo...
相关推荐
链块学院 2020-11-06
afanti 2020-09-14
白开水 2020-07-19
liyansring 2020-07-18
shenzhenzsw 2020-07-18
啦啦啦啦啦 2020-06-28
yangliuhbhd 2020-06-12
小爷有点狂 2020-06-12
无风的雨 2020-06-12
changecan 2020-06-11
蒜蓉粉丝蒸扇贝 2020-06-10
lihongtai 2020-06-08
liaochaowu 2020-06-06
zwt00 2020-06-05
scmrpu 2020-06-02
kuzilala 2020-05-14
小信 2020-05-14