Zithini iiWindows Server Docker kunye neDocker Hub?

NguSara Perrott

I-Docker liqonga lomthombo ovulekileyo elikuncedayo ekupakisheni nasekuhambiseni usetyenziso kwiWindows Server 2019. Ungaqhuba izikhongozeli ezininzi kumamkeli wesikhongozeli, kwaye kuba babelana ngekernel yomamkeli wesikhongozeli, basebenzisa izixhobo ezimbalwa kunaboomatshini ababonakalayo (VMs) kuba awudingi ngaphezulu kwehypervisor ukuze uzilawule.



Uyilo lweDocker

I-Docker iyilelwe ukusebenzisa imodeli yomthengi- yeseva. Umxhasi we-Docker uthetha necandelo le-Docker server, ebizwa ngokuba yi daemon. Umxhasi wakho weDocker unokuba kwiserver efanayo neDocker daemon, okanye ungaqhuba umxhasi weDocker kwindawo yakho yokusebenza.



Umncedisi weDocker

Umncedisi weDocker yingqondo yokusebenza. Ilawula okuninzi okwenzekayo kwi-Docker, kubandakanya izinto ezahlukeneyo ezenziweyo, kunye nonxibelelwano nenkqubo yesicelo se-Docker (API). Icandelo lomncedisi libhekiswa njenge daemon.

isetyenziselwa ntoni ibenadryl

Umxhasi weDocker

Umxhasi weDocker kulapho uwenza khona uninzi lomsebenzi wakho ngezikhongozeli. Nanini na xa uqhuba i-Docker command, uyiqhuba kumxhasi weDocker.



Irejista yeDocker

Imifanekiso yeDocker igcinwe kwirejista yeDocker.

Unokukuva oku kubizwa ngokuba yi Indawo yokugcina . Ubhaliso Ligama elisemthethweni kumaxwebhu eDocker, kodwa uninzi lwabaphuhlisi basetyenziselwa ukubiza olu hlobo lokwakha Indawo yokugcina . Omabini la magama ayasebenza- yazi ukuba ungawabona esetyenziswa ngokungafaniyo.

Izinto zeDocker

Izinto zeDocker ligama elisetyenziselwa ukubhekisa kuninzi lwezinto ezahlukeneyo, ezinjengemifanekiso, izikhongozeli, kunye neenkonzo.



Imiyalelo esisiseko yeDocker

Imiyalelo yeDocker ihlala iqala nge docker kwaye ibandakanya amagama aphambili amisela inyathelo ofuna ukulithatha. Uluhlu luluhlu lweyona miyalelo iqhelekileyo ekufuneka uyikhumbule.

Imiyalelo eqhelekileyo yeDocker
Myalelo Inkcazo
docker pull Tsala umfanekiso wesikhongozeli nakweyiphi na irejista oyilungiselele ukugcina imifanekiso yakho yesikhongozeli
docker push Ukutyhala umfanekiso wakho wesikhongozeli nakweyiphi na irejista oyilungiselele ukugcina imifanekiso yakho yesikhongozeli
docker run Tsala umfanekiso wesikhongozeli ukuba awukabikho kwaye emva koko wenze ikhonteyina entsha kumfanekiso wesikhongozeli
docker images Dwelisa yonke imifanekiso yezikhongozeli egcinwe kwalapha kumamkeli wesikhongozeli
docker login Isetyenziselwa ukungena kwirejista; ayifuneki kubhaliso loluntu, kodwa kufuneka ufikelele kubhaliso lwabucala
docker stop < igama > Yeka isitya esisebenzayo esabizwa ngegama
docker ps Dwelisa zonke izikhongozeli ezisebenza ngelo xesha

Intshayelelo kwiDocker Hub

I-Docker Hub yirejista kawonke-wonke ene-Docker efumanekayo yokugcina imifanekiso yezikhongozeli kwindawo eyodwa. Amashishini anokusebenzisa iDocker Hub ukwenza eyabo indawo yokugcina yabucala yokugcina imifanekiso yezikhongozelo zabanini nayo. Uninzi lweemifanekiso ezikhoyo zivela kwiiprojekhthi ezinkulu ezivulekileyo, kodwa zininzi nemifanekiso yezikhongozelo evela kwimibutho engavulwanga. Umzekelo, iMicrosoft inendawo yogcino yoluntu eneemifanekiso ezimalunga ne-68 ngexesha lokubhalwa.

Usenokuba uyabuza, Ndifika njani eDocker Hub? Kuvakala kukuhle. Fikelela kwifayile ye- I-Docker Hub kwi-intanethi.

Ukufumana imifanekiso yoluntu

Imifanekiso kawonke-wonke zezona zilula ukuzifumana. Awudingi iakhawunti ukukhangela imifanekiso yoluntu, kwaye awudingi iakhawunti ukwenza docker pull inye.

Ukufumana umfanekiso onomdla kuwo, unokuchwetheza umbuzo wakho kwibhokisi yokukhangela ephezulu. Umzekelo, ukuba ufuna ukukhangela i-Server Core, chwetheza nje Isiseko seSeva kwaye ucinezela u-Enter, njengoko kubonisiwe.

Ibhokisi yokukhangela yeDocker Hub

Ibhokisi yokukhangela kwiDocker Hub yenza kube lula ukufumana imifanekiso yezikhongozeli zoluntu kumakhulu emibutho.

Ukuba mnye kuphela umfanekiso wesikhongozeli ohambelana nombuzo wakho, usiwa kwiphepha elinikezelwe kuloo mfanekiso wesikhongozeli. Ukuba uchwetheza igama lombutho, okanye uphendlo lwakho lubuyisa iziphumo ezininzi, unikwa iziphumo zophando. Ukuba ukhangele iMicrosoft, umzekelo, ubunokufumana nawuphi na umfanekiso wesikhongozelo onento yokwenza neMicrosoft. Imifanekiso esemthethweni yesikhongozeli seMicrosoft inokucocwa ngokukhetha uMshicileli oqinisekisiweyo kwiifilitha ezikwicala lasekhohlo lesikrini, njengoko kubonisiwe.

iziphumo ebezingalindelekanga ze-efadrine
ungqinisiso lwabapapashi kwiDocker Hub

Unokucoca ulwelo lwabapapashi abaqinisekisiweyo kwiDocker Hub, eqinisekisa ukuba ufumana umfanekiso wesikhongozeli osemthethweni.

Enye yezinto ezintle kakhulu ngeDocker Hub kukuba unokucofa umfanekiso wesikhongozeli ukuze ufunde okungakumbi ngayo. Iphepha onqakraze kulo liyafana nelo ulifumanayo xa ukhangela imveliso kwaye sinye kuphela iziphumo. Unikwe inkcazo yomfanekiso wesikhongozeli, obandakanya iithegi ezikhoyo kunye nemiyalelo efunekayo yokusebenzisa umfanekiso wesikhongozeli. Le miyalelo ihlala isetyenziselwa ukwamkela izivumelwano zelayisensi. Umzekelo wesikhongozeli seMicrosoft SQL, umzekelo, ikuxelela ukuba usebenzise lo myalelo ukuqala umzekelo we-MS SQL usebenzisa iSQL Express:

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -e 'MSSQL_PID=Express' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest-ubuntu

Ulwazi kumfanekiso wesikhongozeli luya kugubungela iimfuno zesoftware kunye nezinto ezikhoyo ezikhoyo, kunye noluhlu olupheleleyo lweethegi. Iimpawu ziyakuvumela ukuba ukhethe iinguqulelo ezahlukeneyo zomfanekiso wesikhongozeli. Ukuba awuyichazanga ithegi, emva koko ufumana umfanekiso wesikhongozeli ngethegi yamva nje.

Unikwe nomyalelo wokutsala umfanekiso ukuba unomdla kuwo. Umzekelo, ukutsala lo mfanekiso wesikhongozeli seMS SQL kwiDocker, ungasebenzisa oku kulandelayo:

docker pull mcr.microsoft.com/mssql/server

Inye into yokugqibela eluncedo ngokwenene kukuba uyakubona ukuba kukangaphi umfanekiso wesikhongozeli utsaliwe. Olu lwazi luluncedo ukuba awuqhelananga nombutho obonelele ngomfanekiso wesikhongozeli. Ngaphantsi kwegama ecaleni kwelogo yotolo olusezantsi linani elikuxelela ukuba litsalelwe kangaphi. IMicrosoft SQL Server, ngeli xesha lokubhalwa, ibitsaliwe ngaphezulu kweshumi lezihlandlo amaxesha, njengoko kubonisiwe apha.

umfanekiso wesikhongozeli kwihabhu yedokodo

Uyabona ukuba kukangaphi umfanekiso wesikhongozeli utsaliwe.

Ukwenza indawo yokugcina yabucala

Iindawo zokugcina zoluntu zenza ukuba ukufumana imifanekiso yeekhonteyina kube lula, kodwa ukuba usebenza kwimifanekiso yezikhongozeli kwaye awufuni ukuba zibekho esidlangalaleni, uya kufuna ukwenza indawo yokugcina yabucala. Xa utsala okanye utyhala imifanekiso yesikhongozeli kwindawo yakho yokugcina, kuya kufuneka usebenzise docker login uyalele ukungqinisisa ngaphambi kokuba uvunyelwe ukuba usebenze kwindawo yokugcina izinto.

Ngokuzenzekelayo, ufumana indawo enye yasimahla yabucala kwiDocker Hub. Ukuba ufuna oovimba babucala abaninzi kunoko, unokuhlaziya kwisicwangciso esihlawulelweyo. Ngeli xesha lokubhalwa, unokuhlawula i-7 yeedola ngenyanga kwiindawo ezintlanu zabucala.

Ukwenza iakhawunti

Ukwenza iakhawunti kwiDocker Hub kulula kwaye simahla. Ukusuka kwiphepha lasekhaya, cofa indawo yokuNgena kwikona ephezulu ngasekunene. Khetha i-ID yeDocker, faka idilesi ye-imeyile kunye negama lokugqitha, yamkele imigaqo yeDocker, jonga ibhokisi kwiCAPTCHA, emva koko ucofe ukuSayina, njengoko kubonisiwe apha.

Iakhawunti yeDocker Hub

Ungaqala ngeDocker Hub ngolwazi oluncinci kakhulu - yonke into oyifunayo yi-ID yeDocker, idilesi ye-imeyile kunye negama lokugqitha.

Uya kufumana i-imeyile ukuqinisekisa idilesi yemeyile yakho. Cofa kwikhonkco kwi-imeyile ukwenza iakhawunti yakho isebenze.

Ukwenza indawo yokugcina yabucala

Xa ungena kwi-Docker Hub emva kokwenza iakhawunti yakho, uyabuzwa ukuba uyafuna na ukwenza indawo yokugcina izinto okanye wenze umbutho.

  1. Cofa ku Yenza indawo yokugcina izinto.
  2. Ngenisa igama lokugcina kunye nenkcazo.
  3. Guqula ukubonakala ku-Bucala.
  4. Cofa Yenza.

Unokukhetha ukudibanisa indawo yakho yokugcina eyimfihlo kwiakhawunti yakho yeGitHub okanye yeBitbucket ukwenza umfanekiso wesikhongozeli ozenzekelayo. Le menyu ibekwe kwimenyu yokudala yokugcina, nangona ungabuyela emva kamva kwaye usete ukuba ufuna njalo.

Emva kokuba ugcino lwakho lwenziwe, aluyi kubakho, kodwa luya kukunika isampulu yomyalelo oya kuwufuna ukuqhuba ukutyhala izinto kwindawo yakho yokugcina, njengoko kubonisiwe.

e 64 ipilisi vs xanax
Indawo yokugcina i-Docker Hub

Indawo yakho yokugcina ayinanto xa uqala ukuyenza, kodwa iqulethe umyalelo wokutyhala imifanekiso yesikhongozeli kuyo.

Sebenzisa indawo yokugcina yabucala

Sebenzisa indawo yakho yabucala, kufuneka kuqala ungene kwi-Docker; emva koko ungatyhala kunye nokutsala imifanekiso yesikhongozeli kangangoko ufuna. Ukungena, faka lo myalelo ulandelayo:

docker login

Ukutsala umfanekiso osemgangathweni weNano Server kwindawo yokugcina kaMicrosoft. yongeza umyalelo oya kukuvumela ukuba ucofe umfanekiso wesikhongozeli kwindawo yakho yokugcina. Ngokwesiqhelo uyakwenza oku emva kokuba wenze utshintsho kumfanekiso.

docker push < mydockerid >/myrepo:nano

Umyalelo usebenzisa i-ID yam yeDocker, elandelwa ligama lendawo yam yokugcina izinto, kunye nethegi esetyenzisiweyo kumfanekiso wesikhongozeli sam. Kule meko, ithegi enexabiso le nano. Ungawabona icandelo lomgca wokuyalela kulo mzobo ulandelayo.

Ukungena kweDocker Hub

Ungayisebenzisa i-Docker imiyalelo yokutyhala imifanekiso kwindawo yakho yabucala emva kokuba ungene nge docker login umyalelo.

Emva kokuba umfanekiso wesikhongozeli utyaliwe, iya kuvela kwindawo yokugcina izinto kwiDocker Hub. Zonke iithegi zakho ezityhalelwe kwiDocker Hub ziyavela kwisango lakho. Awunakho ukuguqula imifanekiso yesikhongozeli ngaphakathi kweDocker Hub; eneneni, ekuphela kwento onokuyenza kukuzicima. Ukuguqula imifanekiso yakho yesikhongozeli, kuya kufuneka uyitsale, wenze utshintsho lwakho, kwaye uyityhale kwakhona. Eli nani lilandelayo likubonisa ukuba i-Docker Hub ijongeka kanjani emva kokuba umfanekiso wekhonteyina ophawuliweyo utyaliwe.

Umfuziselo wesikhongozeli seDocker Hub

Umfanekiso wekhonteyina ophawuliweyo, nano, ubonakala kwiDocker Hub emva kokuba utyhalelwe kwiserver.

Ukutsala umfanekiso wesikhongozeli ukuze uhlengahlengise, khupha umyalelo ofanayo kwinto oyisebenzisileyo ukuTsala umfanekiso ophawuliweyo:

docker pull < mydockerid >/myrepo:nano

Emva kokwenza utshintsho ekufuneka ulwenzile (njengokuhlaziya umfanekiso wesikhongozeli), unokuwutyhala ubuyele kwindawo yakho yabucala apho ifikeleleka kuyo nayiphi na inkqubo onokungena kuyo kwindawo yokugcina izinto zeDocker.