剛開(kāi)始走了彎路埃唯,按照網(wǎng)絡(luò)上的教程一步步安裝docker
sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
sudo 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 install docker-ce
docker run hello-world
這時(shí)一直出現(xiàn)這個(gè)錯(cuò)誤
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
網(wǎng)絡(luò)上說(shuō)是docker沒(méi)啟墨叛,按照網(wǎng)絡(luò)上的操作步驟執(zhí)行了,還是報(bào)錯(cuò)巍实,百度上大多數(shù)答案都是類似的,后來(lái)到bing上看了國(guó)外網(wǎng)友的回答令漂,才知道win10下的ubuntu子系統(tǒng)比較特殊丸边,必須要先安裝window版的docker,同時(shí)設(shè)置
同時(shí)設(shè)置
powershell中
echo "export DOCKER_HOST=tcp://localhost:2375" >> ~/.bashrc && source ~/.bashrc
然后問(wèn)題解決