1. linux下安装docker
for centos
:
https://docs.docker.com/engine/install/centos/
卸载旧版本docker:
$ sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
使用docker仓库进行安装:
$ sudo yum install -y yum-utils
官方源:
$ sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
阿里云docker源:
$ sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
安装docker engine
:
$ sudo yum install docker-ce docker-ce-cli containerd.io
开启docker服务:
$ sudo systemctl start docker
卸载docker engine
:
$ sudo yum remove docker-ce docker-ce-cli containerd.io
2. mac下安装docker
https://docs.docker.com/desktop/install/mac-install/