ubuntu 安装 docker
docker 卸载:sudo apt-get remove docker docker-engine docker.io安装 docker sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ ...
docker 卸载:sudo apt-get remove docker docker-engine docker.io
安装 docker
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
install docker CE
sudo apt-get update
sudo apt-get install docker-ce
apt-cache madison docker-ce
sudo apt-get install docker-ce
sudo docker run hello-world
如果还没有 docker group 就添加一个:
sudo groupadd docker
将用户加入该 group 内。然后退出并重新登录就生效啦。
sudo usermod -a ${USER} docker
重启 docker 服务
sudo service docker restart
切换当前会话到新 group 或者重启 X 会话
newgrp - docker
更多推荐
所有评论(0)