安装
通过yum安装Docker
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
systemctl start docker
通过bash脚本安装Docker
curl -fsSL https://get.docker.com | bash -s docker
# curl -sSL https://get.daocloud.io/docker | sh
设置镜像地址
1vim /etc/docker/daemon.json
2
3{
4 "registry-mirrors": [
5 "https://docker.mirrors.ustc.edu.cn",
6 "http://hub-mirror.c.163.com",
7 "https://registry.docker-cn.com"
8 ]
9}
10
11----------------------------------------------
12
13systemctl restart docker
运行权限问题
1sudo usermod -aG docker $USER
2sudo reboot