Ubuntu安装docker
参考:
uname -a
// Linux dlserver 4.15.0-33-generic #36~16.04.1-Ubuntu SMP Wed Aug 15 17:21:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
sudo grep device-mapper /proc/devices
// 253 device-mapper
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
sudo apt-get remove docker docker-engine docker-ce docker.io
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache madison docker-ce
sudo apt-get install -y docker-ce=版本号
sudo apt-get install -y docker-ce
sudo service docker stop
cd /etc/systemd/system/docker.service.d
如果没有docker.service.d 则创建这个路径:
cd /etc/systemd/system/
mkdir docker.service.d
sudo vim docker-overlay.conf
如果没有则创建这个文件 touch docker-overlay.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --graph="新的存储路径" --storage-driver=overlay
systemctl daemon-reload
sudo service docker start
sudo docker info
如有其它问题,欢迎大家留言,我们一起讨论,一起学习,一起进步