換了個deepin試試手,發現docker官網並沒有deepin的安裝教程,所幸deepin改自debian,所以參考debian安裝docker的教程,進行一些微調即可
系統版本:Deepin 4.9.8-4 (2017-04-17) x86_64 GNU/Linux
debian安裝教程網址: https://store.docker.com/editions/community/docker-ce-server-debian
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
python-software-properties
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
以上三步跟着教程來,接着編輯/etc/apt/sources.list
其中應用有一行
deb [arch=amd64] https://download.docker.com/linux/debian unstable stable
將其改成
deb [arch=amd64] https://download.docker.com/linux/debian wheezy stable
然後執行更新源操作
sudo apt-get update
安裝docker-cesudo apt-get -y install docker-ce
設置非root用戶
首先,查看是否有docker用戶組
cat /etc/group | grep docker
sudo groupadd -g 999 docker
將當前用戶加入用戶組
sudo gpasswd -a ${USER} docker
修改docker.sock的權限
sudo chmod a+rw /var/run/docker.sock
安裝chkconfig
sudo apt-get install chkconfig
將docker移除開機自啓項
sudo chkconfig --del docker
重啓電腦