NB狗

当前位置:?? 网站首页 >> Centos

debian linux安装docker并测试

  1. 64位系统

  2. Jessie 8.0 (LTS)以上

卸载旧版本

$?sudo?apt-get?remove?docker?docker-engine?docker.io

安装

$?sudo?apt-get?update
$?sudo?apt-get?install?\
?????apt-transport-https?\
?????ca-certificates?\
?????curl?\
?????gnupg2?\
?????software-properties-common
$?curl?-fsSL?https://download.docker.com/linux/$(.?/etc/os-release;?echo?"$ID")/gpg?|?sudo?apt-key?add?-$?sudo?add-apt-repository?\???"deb?[arch=amd64]?https://download.docker.com/linux/$(.?/etc/os-release;?echo?"$ID")?\
???$(lsb_release?-cs)?\
???stable"$?sudo?apt-get?update
$?sudo?apt-get?install?docker-ce

测试

[email?protected]:~$?sudo?docker?run?hello-world
?Hello?from?Docker!This?message?shows?that?your?installation?appears?to?be?working?correctly.?To?generate?this?message,?Docker?took?the?following?steps:.?The?Docker?client?contacted?the?Docker?daemon..?The?Docker?daemon?pulled?the?"hello-world"?image?from?the?Docker?Hub..?The?Docker?daemon?created?a?new?container?from?that?image?which?runs?the
????executable?that?produces?the?output?you?are?currently?reading..?The?Docker?daemon?streamed?that?output?to?the?Docker?client,?which?sent?it
????to?your?terminal.?To?try?something?more?ambitious,?you?can?run?an?Ubuntu?container?with:
?$?docker?run?-it?ubuntu?bash
?Share?images,?automate?workflows,?and?more?with?a?free?Docker?ID:
?https://cloud.docker.com/?For?more?examples?and?ideas,?visit:
?https://docs.docker.com/engine/userguide/