centosÔõôװdocker
ÔÚ centos ϵͳÖÐ×°Öà docker£¬ÐèÒÀ´ÎÖ´ÐÐÒÔÏ°취£ºÆôÓà epel ´æ´¢¿â¡£Ìí¼Ó docker yum ´æ´¢¿â¡£×°Öà docker ce¡£Æô¶¯ docker ЧÀÍ¡£½«ÄúµÄÓû§Ìí¼Óµ½ docker ×é¡£
ÔõÑùÔÚ CentOS ϵͳÖÐ×°Öà Docker
Docker ÊÇÒ»¸ö¿ªÔ´ÈÝÆ÷ƽ̨£¬¿ÉÓÃÓÚÇáËÉ°²ÅźÍÖÎÀí¿ç²î±ðƽ̨µÄÓ¦ÓóÌÐò¡£±¾½Ì³Ì½«Ö¸µ¼ÄúÔÚ CentOS ϵͳÖÐ×°Öà Docker¡£
°ì·¨ 1£ºÆôÓà Extra Packages for Enterprise Linux (EPEL) ´æ´¢¿â
sudo yum install epel-release
µÇ¼ºó¸´ÖÆ
°ì·¨ 2£ºÌí¼Ó Docker Yum ´æ´¢¿â
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
µÇ¼ºó¸´ÖÆ
°ì·¨ 3£º×°Öà Docker CE
sudo yum install docker-ce
µÇ¼ºó¸´ÖÆ
°ì·¨ 4£ºÆô¶¯ Docker ЧÀÍ
sudo systemctl start docker
µÇ¼ºó¸´ÖÆ
°ì·¨ 5£ºÌí¼ÓÄúµÄÓû§µ½ Docker ×é
ÒªÎÞÐè sudo ȨÏÞ¼´¿ÉÔËÐÐ Docker ÏÂÁÇ뽫ÄúµÄÓû§Ìí¼Óµ½ docker ×éÖУº
sudo usermod -aG docker $USER
µÇ¼ºó¸´ÖÆ
ÑéÖ¤ Docker ×°ÖÃ
ÒªÑéÖ¤ Docker ÊÇ·ñÒÑÀÖ³É×°Öã¬ÇëÔËÐÐÒÔÏÂÏÂÁ
sudo docker run hello-world
µÇ¼ºó¸´ÖÆ
Õ⽫ÀÈ¡²¢ÔËÐÐÒ»¸ö¼òÆӵġ°Hello World¡±ÈÝÆ÷¡£ÈôÊÇÏÂÁîÀÖ³ÉÔËÐУ¬ÄúÓ¦¸Ã»á¿´µ½¡°Hello from Docker!¡± ÐÂÎÅ¡£
½ÓÏÂÀ´×öʲô
ÏÖÔÚÄúÒÑÀÖ³ÉÔÚ CentOS ÖÐ×°Öà Docker£¬Äú¿ÉÒÔ×îÏÈʹÓÃËüÀ´¹¹½¨¡¢°²ÅźÍÖÎÀíÄúµÄÓ¦ÓóÌÐòÈÝÆ÷¡£ÓйØÔõÑùÔÚ Docker ÖÐʹÓÃÈÝÆ÷µÄ¸ü¶àÐÅÏ¢£¬Çë²ÎÔÄ Docker Îĵµ¡£
ÒÔÉϾÍÊÇcentosÔõôװdockerµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡