标签:arc rest add border emctl col war hit bin
1 root@docker:~# wget -qO- https://get.docker.com/ | sh 2 或—— 3 root@docker:~# curl -sSL https://get.docker.com/ | sh
1 yum provides applydeltarpm #查询缺少的applydeltarpm所在包 2 yum install libdevmapper* -y 3 yum -y install deltarpm #安装此包 4 yum install -y epel-release #有可能会依旧提示错误,安装此包即可 5 root@docker:~# docker version #查询docker版本
1 root@docker:~# yum -y remove docker 2 docker-client 3 docker-client-latest 4 docker-common 5 docker-latest 6 docker-latest-logrotate 7 docker-logrotate 8 docker-selinux 9 docker-engine-selinux 10 docker-engine #若存在旧版需要全新安装可卸载旧版 11 root@docker:~# yum -y update 12 root@docker:~# yum install -y yum-utils 13 device-mapper-persistent-data 14 lvm2 15 root@docker:~# yum-config-manager 16 --add-repo 17 https://download.docker.com/linux/centos/docker-ce.repo #配置docker源
1 root@docker:~# yum-config-manager 2 --add-repo 3 http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 4 root@docker:~# yum-config-manager --enable docker-ce-edge #开启源 5 root@docker:~# yum-config-manager --enable docker-ce-test #开启源 6 root@docker:~# yum -y install docker-ce #安装docker 7 root@docker:~# yum -y install docker-registry #安装docker仓库 8 root@docker:~# systemctl start docker.service 9 root@docker:~# systemctl enable docker.service #设为开机启动
1 root@docker:~# apt-get remove docker docker-engine docker.io #卸载旧版 2 root@docker:~# sudo apt-get update
1 root@docker:~# sudo apt-get -y install 2 apt-transport-https 3 ca-certificates 4 curl 5 software-properties-common #安装软件包以允许apt通过HTTPS使用存储库
1 root@docker:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
1 root@docker:~# sudo apt-key fingerprint 0EBFCD88
1 root@docker:~# sudo add-apt-repository 2 "deb [arch=amd64] https://download.docker.com/linux/ubuntu 3 $(lsb_release -cs) 4 stable" 5 root@docker:~# sudo apt-get update
1 root@docker:~# sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" 2 root@docker:~# sudo apt-get update
1 root@docker:~# sudo apt-get -y install docker-ce
1 root@docker:~# sudo docker run hello-world 2 root@docker:~# sudo docker version
1 root@docker:~# mkdir -p /etc/docker 2 root@docker:~# vim /etc/docker/daemon.json 3 { 4 "registry-mirrors": ["https://dbzucv6w.mirror.aliyuncs.com"] 5 } 6 root@docker:~# cat /etc/docker/daemon.json 7 { 8 "registry-mirrors": ["https://dbzucv6w.mirror.aliyuncs.com"] 9 } 10 root@docker:~# systemctl daemon-reload 11 root@docker:~# systemctl restart docker 12 root@docker:~# sudo systemctl enable docker
1 root@docker:~# vi /usr/lib/systemd/system/docker.service 2 ExecStart=/usr/bin/dockerd-current --graph=/data/docker #仅需要追加新路径 3 root@docker:~# systemctl daemon-reload 4 root@docker:~# systemctl restart docker
标签:arc rest add border emctl col war hit bin
原文地址:https://www.cnblogs.com/itzgr/p/10193650.html