1、下载docker源码包
docker官网地址: https://download.docker.com/linux/static/stable/
选择.tgz的包下载,例如:https://download.docker.com/linux/static/stable/x86_64/docker-19.03.1.tgz
wget https://download.docker.com/linux/static/stable/x86_64/docker-19.03.1.tgz
2、解压复制
mkdir -p /usr/local/docker mkdir -p /data/docker tar -zxvf docker-19.03.1.tgz cp docker/* /usr/local/docker/ vim /etc/profile #找到PATH部分,加上docker的路径,如:PATH=.:/usr/local/docker source /etc/profile
3、运行docker后台进程
dockerd -g /data/docker &