获取最新安装包
wget -qO- https://get.docker.com/ | sh
提示
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
sudo usermod -aG docker xxx
Remember that you will have to log out and back in for this to take effect!
执行sudo usermod -aG docker SENSETIME\xiaxuesong
,然后显示usermod: user 'SENSETIMExiaxuesong' does not exist
此时需要将用户添加到用户组
sudo groupadd docker #提示groupadd: group 'docker' already exists
sudo gpasswd -a ${USER} docker #提示Adding user SENSETIME\xiaxuesong to group docker
重启dockersudo service docker restart
并切换到docker用户组newgrp - docker
查看已有的镜像docker images
查看docker版本docker --version