(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮

Posted java澶ф暟鎹慨鐐间箣閬?/a>

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮相关的知识,希望对你有一定的参考价值。

姣忔櫄涔濈偣: 鎶€鏈共璐?馃憠 蹇呭畾濂変笂

鍝堝柦锛屽悇浣嶆柊鏉ョ殑灏忎紮浼翠滑锛屽ぇ瀹跺ソ锛佺敱浜庡叕浼楀彿鍋氫簡鏀圭増锛屼负浜嗕繚璇佸叕浼楀彿鐨勮祫婧愯兘鍑嗘椂鎺ㄩ€佸埌浣犳墜閲岋紝澶у璁板緱灏嗗挶浠殑鍏紬鍙?nbsp;鍔犳槦鏍囩疆椤?/span> 锛屽湪姝ょ湡璇氱殑琛ㄧず鎰熻阿

www.cnblogs.com/zhangxingeng/p/11236968.html


涓€銆佺畝浠?/span>


1銆佷簡瑙ocker鐨勫墠鐢烲XC


LXC涓篖inux Container鐨勭畝鍐欍€傚彲浠ユ彁渚涜交閲忕骇鐨勮櫄鎷熷寲锛屼互渚块殧绂昏繘绋嬪拰璧勬簮锛岃€屼笖涓嶉渶瑕佹彁渚涙寚浠よВ閲婃満鍒朵互鍙婂叏铏氭嫙鍖栫殑鍏朵粬澶嶆潅鎬с€傜浉褰撲簬C++涓殑NameSpace銆傚鍣ㄦ湁鏁堝湴灏嗙敱鍗曚釜鎿嶄綔绯荤粺绠$悊鐨勮祫婧愬垝鍒嗗埌瀛ょ珛鐨勭粍涓紝浠ユ洿濂藉湴鍦ㄥ绔嬬殑缁勪箣闂村钩琛℃湁鍐茬獊鐨勮祫婧愪娇鐢ㄩ渶姹傘€?/span>


涓庝紶缁熻櫄鎷熷寲鎶€鏈浉姣旓紝瀹冪殑浼樺娍鍦ㄤ簬锛?/span>


  1. 涓庡涓绘満浣跨敤鍚屼竴涓唴鏍革紝鎬ц兘鎹熻€楀皬锛?/span>

  2. 涓嶉渶瑕佹寚浠ょ骇妯℃嫙锛?/span>

  3. 涓嶉渶瑕佸嵆鏃?Just-in-time)缂栬瘧锛?/span>

  4. 瀹瑰櫒鍙互鍦–PU鏍稿績鐨勬湰鍦拌繍琛屾寚浠わ紝涓嶉渶瑕佷换浣曚笓闂ㄧ殑瑙i噴鏈哄埗锛?/span>

  5. 閬垮厤浜嗗噯铏氭嫙鍖栧拰绯荤粺璋冪敤鏇挎崲涓殑澶嶆潅鎬э紱

  6. 杞婚噺绾ч殧绂伙紝鍦ㄩ殧绂荤殑鍚屾椂杩樻彁渚涘叡浜満鍒讹紝浠ュ疄鐜板鍣ㄤ笌瀹夸富鏈虹殑璧勬簮鍏变韩銆?/span>


鎬荤粨锛歀inux Container鏄竴绉嶈交閲忕骇鐨勮櫄鎷熷寲鐨勬墜娈点€?/span>


Linux Container鎻愪緵浜嗗湪鍗曚竴鍙帶涓绘満鑺傜偣涓婃敮鎸佸涓浉浜掗殧绂荤殑server container鍚屾椂鎵ц鐨勬満鍒躲€侺inux Container鏈夌偣鍍廲hroot锛屾彁渚涗簡涓€涓嫢鏈夎嚜宸辫繘绋嬪拰缃戠粶绌洪棿鐨勮櫄鎷熺幆澧冿紝浣嗗張鏈夊埆浜庤櫄鎷熸満锛屽洜涓簂xc鏄竴绉嶆搷浣滅郴缁熷眰娆′笂鐨勮祫婧愮殑铏氭嫙鍖栥€?/span>


2銆丩XC涓巇ocker浠€涔堝叧绯伙紵


docker骞朵笉鏄疞XC鏇夸唬鍝侊紝docker搴曞眰浣跨敤浜哃XC鏉ュ疄鐜帮紝LXC灏唋inux杩涚▼娌欑洅鍖栵紝浣垮緱杩涚▼涔嬮棿鐩镐簰闅旂锛屽苟涓旇兘澶熻鍝﹀唴闃佸埗鍚勮繘绋嬬殑璧勬簮鍒嗛厤銆?/span>


鍦↙XC鐨勫熀纭€涔嬩笂锛宒ocker鎻愪緵浜嗕竴绯诲垪鏇村己澶х殑鍔熻兘銆?/span>


3銆佷粈涔堟槸docker


docker鏄竴涓紑婧愮殑搴旂敤瀹瑰櫒寮曟搸锛屽熀浜巊o璇█寮€鍙戝苟閬靛惊浜哸pache2.0鍗忚寮€婧愩€?/span>


docker鍙互璁╁紑鍙戣€呮墦鍖呬粬浠殑搴旂敤浠ュ強渚濊禆鍖呭埌涓€涓交閲忕骇銆佸彲绉绘鐨勫鍣ㄤ腑锛岀劧鍚庡彂甯冨埌浠讳綍娴佽鐨刲inux鏈嶅姟鍣紝涔熷彲浠ュ疄鐜拌櫄鎷熷寲銆?/span>


瀹瑰櫒鏄畬鍏ㄤ娇鐢ㄦ矙绠辨満鍒讹紝鐩镐簰涔嬮棿涓嶄細鏈変换浣曟帴鍙o紙绫籭phone鐨刟pp锛夛紝骞朵笖瀹瑰櫒寮€閿€鏋佸叾浣庛€?/span>


4銆乨ocker瀹樻柟鏂囨。


https://docs.docker.com/


5銆佷负浠€涔坉ocker瓒婃潵瓒婂彈娆㈣繋


瀹樻柟璇濊锛?/span>


  • 瀹瑰櫒鍖栬秺鏉ヨ秺鍙楁杩庯紝鍥犱负瀹瑰櫒鏄細


  • 鐏垫椿锛氬嵆浣挎槸鏈€澶嶆潅鐨勫簲鐢ㄤ篃鍙互闆嗚绠卞寲銆?/span>

  • 杞婚噺绾э細瀹瑰櫒鍒╃敤骞跺叡浜富鏈哄唴鏍搞€?/span>

  • 鍙簰鎹細鎮ㄥ彲浠ュ嵆鏃堕儴缃叉洿鏂板拰鍗囩骇銆?/span>

  • 渚挎惡寮忥細鎮ㄥ彲浠ュ湪鏈湴鏋勫缓锛岄儴缃插埌浜戯紝骞跺湪浠讳綍鍦版柟杩愯銆?/span>

  • 鍙墿灞曪細鎮ㄥ彲浠ュ鍔犲苟鑷姩鍒嗗彂瀹瑰櫒鍓湰銆?/span>

  • 鍙爢鍙狅細鎮ㄥ彲浠ュ瀭鐩村拰鍗虫椂鍫嗗彔鏈嶅姟銆?/span>


  • 闀滃儚鍜屽鍣紙contalners锛?/span>


閫氳繃闀滃儚鍚姩涓€涓鍣紝涓€涓暅鍍忔槸涓€涓彲鎵ц鐨勫寘锛屽叾涓寘鎷繍琛屽簲鐢ㄧ▼搴忔墍闇€瑕佺殑鎵€鏈夊唴瀹瑰寘鍚唬鐮侊紝杩愯鏃堕棿锛屽簱銆佺幆澧冨彉閲忋€佸拰閰嶇疆鏂囦欢銆?/span>

瀹瑰櫒鏄暅鍍忕殑杩愯瀹炰緥锛屽綋琚繍琛屾椂鏈夐暅鍍忕姸鎬佸拰鐢ㄦ埛杩涚▼锛屽彲浠ヤ娇鐢╠ocker ps 鏌ョ湅銆?/span>


  • 瀹瑰櫒鍜岃櫄鎷熸満


瀹瑰櫒鏃跺湪linux涓婃湰鏈鸿繍琛岋紝骞朵笌鍏朵粬瀹瑰櫒鍏变韩涓绘満鐨勫唴鏍革紝瀹冭繍琛岀殑涓€涓嫭绔嬬殑杩涚▼锛屼笉鍗犵敤鍏朵粬浠讳綍鍙墽琛屾枃浠剁殑鍐呭瓨锛岄潪甯歌交閲忋€?/span>


铏氭嫙鏈鸿繍琛岀殑鏄竴涓畬鎴愮殑鎿嶄綔绯荤粺锛岄€氳繃铏氭嫙鏈虹鐞嗙▼搴忓涓绘満璧勬簮杩涜铏氭嫙璁块棶锛岀浉姣斾箣涓嬮渶瑕佺殑璧勬簮鏇村銆?/span>


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


6銆乨ocker鐗堟湰


Docker Community Edition锛圕E锛夌ぞ鍖虹増

Enterprise Edition(EE) 鍟嗕笟鐗?/span>


7銆乨ocker鍜宱penstack鐨勫嚑椤瑰姣?/span>


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


8銆佸鍣ㄥ湪鍐呮牳涓敮鎸?绉嶉噸瑕佹妧鏈?/span>


docker鏈川灏辨槸瀹夸富鏈虹殑涓€涓繘绋嬶紝docker鏄€氳繃namespace瀹炵幇璧勬簮闅旂锛岄€氳繃cgroup瀹炵幇璧勬簮闄愬埗锛岄€氳繃鍐欐椂澶嶅埗鎶€鏈紙copy-on-write锛夊疄鐜颁簡楂樻晥鐨勬枃浠舵搷浣滐紙绫讳技铏氭嫙鏈虹殑纾佺洏姣斿鍒嗛厤500g骞朵笉鏄疄闄呭崰鐢ㄧ墿鐞嗙鐩?00g锛?/span>


1锛塶amespaces 鍚嶇О绌洪棿


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


2锛塩ontrol Group 鎺у埗缁?/span>


cgroup鐨勭壒鐐规槸锛氥€€

銆€銆€銆€銆€銆€

  • cgroup鐨刟pi浠ヤ竴涓吉鏂囦欢绯荤粺鐨勫疄鐜版柟寮忥紝鐢ㄦ埛鐨勭▼搴忓彲浠ラ€氳繃鏂囦欢绯荤粺瀹炵幇cgroup鐨勭粍浠剁鐞?/span>

  • cgroup鐨勭粍浠剁鐞嗘搷浣滃崟鍏冨彲浠ョ粏绮掑害鍒扮嚎绋嬬骇鍒紝鍙﹀鐢ㄦ埛鍙互鍒涘缓鍜岄攢姣乧group锛屼粠鑰屽疄鐜拌祫婧愯浇鍒嗛厤鍜屽啀鍒╃敤

  • 鎵€鏈夎祫婧愮鐞嗙殑鍔熻兘閮戒互瀛愮郴缁熺殑鏂瑰紡瀹炵幇锛屾帴鍙g粺涓€瀛愪换鍔″垱寤轰箣鍒濅笌鍏剁埗浠诲姟澶勪簬鍚屼竴涓猚group鐨勬帶鍒剁粍


鍥涘ぇ鍔熻兘锛?/span>


  • 璧勬簮闄愬埗锛氬彲浠ュ浠诲姟浣跨敤鐨勮祫婧愭€婚杩涜闄愬埗

  • 浼樺厛绾у垎閰嶏細閫氳繃鍒嗛厤鐨刢pu鏃堕棿鐗囨暟閲忎互鍙婄鐩業O甯﹀澶у皬锛屽疄闄呬笂鐩稿綋浜庢帶鍒朵簡浠诲姟杩愯浼樺厛绾?/span>

  • 璧勬簮缁熻锛氬彲浠ョ粺璁$郴缁熺殑璧勬簮浣跨敤閲忥紝濡俢pu鏃堕暱锛屽唴瀛樼敤閲忕瓑

  • 浠诲姟鎺у埗锛歝group鍙互瀵逛换鍔℃墽琛屾寕璧枫€佹仮澶嶇瓑鎿嶄綔


9銆佷簡瑙ocker涓変釜閲嶈姒傚康


1锛塱mage闀滃儚


docker闀滃儚灏辨槸涓€涓彧璇绘ā鏉匡紝姣斿锛屼竴涓暅鍍忓彲浠ュ寘鍚竴涓畬鏁寸殑centos锛岄噷闈粎瀹夎apache鎴栫敤鎴风殑鍏朵粬搴旂敤锛岄暅鍍忓彲浠ョ敤鏉ュ垱寤篸ocker瀹瑰櫒锛屽彟澶杁ocker鎻愪緵浜嗕竴涓緢绠€鍗曠殑鏈哄埗鏉ュ垱寤洪暅鍍忔垨鑰呮洿鏂扮幇鏈夌殑闀滃儚锛岀敤鎴风敋鑷冲彲浠ョ洿鎺ヤ粠鍏朵粬浜洪偅閲屼笅鍛ㄤ竴涓凡缁忓仛濂界殑闀滃儚鏉ョ洿鎺ヤ娇鐢?/span>


2锛塩ontainer瀹瑰櫒


docker鍒╃敤瀹瑰櫒鏉ヨ繍琛屽簲鐢紝瀹瑰櫒鏄粠闀滃儚鍒涘缓鐨勮繍琛屽疄渚嬶紝瀹冨彲浠ヨ鍚姩锛屽紑濮嬨€佸仠姝€佸垹闄ゃ€佹瘡涓鍣ㄩ兘鏄簰鐩搁殧绂荤殑锛屼繚璇佸畨鍏ㄧ殑骞冲彴锛屽彲浠ュ惂瀹瑰櫒鐪嬪仛鏄缁欑畝鏄撶増鐨刲inux鐜锛堝寘鎷瑀oot鐢ㄦ埛鏉冮檺銆侀暅鍍忕┖闂淬€佺敤鎴风┖闂村拰缃戠粶绌洪棿绛夛級鍜岃繍琛屽啀鍏朵腑鐨勫簲鐢ㄧ▼搴?/span>


3锛塺epostory浠撳簱


浠撳簱鏄泦涓瓨鍌ㄩ暅鍍忔枃浠剁殑娌ф锛宺egistry鏄粨搴撲富浠庢湇鍔″櫒锛屽疄闄呬笂鍙傝€冩敞鍐屾湇鍔″櫒涓婂瓨鏀剧潃澶氫釜浠撳簱锛屾瘡涓粨搴撲腑鍙堝寘鍚簡澶氫釜闀滃儚锛屾瘡涓暅鍍忔湁涓嶅悓鐨勬爣绛撅紙tag锛?/span>

浠撳簱鍒嗕负涓ょ锛屽叕鏈夊弬鑰冿紝鍜岀鏈変粨搴擄紝鏈€澶х殑鍏紑浠撳簱鏄痙ocker Hub锛屽瓨鏀句簡鏁伴噺搴炲ぇ鐨勯暅鍍忎緵鐢ㄦ埛涓嬪懆锛屽浗鍐呯殑docker pool锛岃繖閲屼粨搴撶殑姒傚康涓嶨it绫讳技锛宺egistry鍙互鐞嗚В涓篻ithub杩欐牱鐨勬墭绠℃湇鍔°€?/span>


10銆乨ocker鐨勪富瑕佺敤閫?/span>


瀹樻柟灏辨槸Bulid 銆乻hip銆乺un any app/any where锛岀紪璇戙€佽杞姐€佽繍琛屻€佷换浣昦pp/鍦ㄤ换鎰忓湴鏀鹃兘鑳借繍琛屻€?/span>


灏辨槸瀹炵幇浜嗗簲鐢ㄧ殑灏佽銆侀儴缃层€佽繍琛岀殑鐢熷懡鍛ㄦ湡绠$悊鍙鍦╣libc鐨勭幆澧冧笅锛岄兘鍙互杩愯銆?/span>


杩愮淮鐢熸垚鐜涓細docker鍖栥€?/span>


  • 鍙戝竷鏈嶅姟涓嶇敤鎷呭績鏈嶅姟鍣ㄧ殑杩愯鐜锛屾墍鏈夌殑鏈嶅姟鍣ㄩ兘鏄嚜鍔ㄥ垎閰峝ocker锛岃嚜鍔ㄩ儴缃诧紝鑷姩瀹夎锛岃嚜鍔ㄨ繍琛?/span>

  • 鍐嶄笉鐢ㄦ媴蹇冨叾浠栨湇鍔″紩鎿庣殑纾佺洏闂锛宑pu闂锛岀郴缁熼棶棰樹簡

  • 璧勬簮鍒╃敤鏇村嚭鑹?/span>

  • 鑷姩杩佺Щ锛屽彲浠ュ埗浣滈暅鍍忥紝杩佺Щ浣跨敤鑷畾涔夌殑闀滃儚鍗冲彲杩佺Щ锛屼笉浼氬嚭鐜颁粈涔堥棶棰?/span>

  • 绠$悊鏇村姞鏂逛究浜?/span>


11銆乨ocker鏀瑰彉浜嗕粈涔?/span>


  • 闈㈠悜浜у搧锛氫骇鍝佷氦浠?/span>

  • 闈㈠悜寮€鍙戯細绠€鍖栫幆澧冮厤缃?/span>

  • 闈㈠悜娴嬭瘯锛氬鐗堟湰娴嬭瘯

  • 闈㈠悜杩愮淮锛氱幆澧冧竴鑷存€?/span>

  • 闈㈠悜鏋舵瀯锛氳嚜鍔ㄥ寲鎵╁锛堝井鏈嶅姟锛?/span>


浜屻€乨ocker鏋舵瀯


1銆佹€讳綋鏋舵瀯


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


  • distribution 璐熻矗涓巇ocker registry浜や簰锛屼笂浼犳礂婢¢暅鍍忎互鍙妚2 registry 鏈夊叧鐨勬簮鏁版嵁

  • registry璐熻矗docker registry鏈夊叧鐨勮韩浠借璇併€侀暅鍍忔煡鎵俱€侀暅鍍忛獙璇佷互鍙婄鐞唕egistry mirror绛変氦浜掓搷浣?/span>

  • image 璐熻矗涓庨暅鍍忔簮鏁版嵁鏈夊叧鐨勫瓨鍌ㄣ€佹煡鎵撅紝闀滃儚灞傜殑绱㈠紩銆佹煡鎵句互鍙婇暅鍍弔ar鍖呮湁鍏崇殑瀵煎叆銆佸鍑烘搷浣?/span>

  • reference璐熻矗瀛樺偍鏈湴鎵€鏈夐暅鍍忕殑repository鍜宼ag鍚嶏紝骞剁淮鎶や笌闀滃儚id涔嬮棿鐨勬槧灏勫叧绯?/span>

  • layer妯″潡璐熻矗涓庨暅鍍忓眰鍜屽鍣ㄥ眰婧愭暟鎹湁鍏崇殑澧炲垹鏀规煡锛屽苟璐熻矗灏嗛暅鍍忓眰鐨勫鍒犳敼鏌ユ槧灏勫埌瀹為檯瀛樺偍闀滃儚灞傛枃浠剁殑graphdriver妯″潡

  • graghdriver鏄墍鏈変笌瀹瑰櫒闀滃儚鐩稿叧鎿嶄綔鐨勬墽琛岃€?/span>


2銆乨ocker鏋舵瀯2


濡傛灉瑙夊緱涓婇潰鏋舵瀯鍥炬瘮杈冧贡鍙互鐪嬭繖涓灦鏋勶細


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


浠庝笂鍥句笉闅剧湅鍑猴紝鐢ㄦ埛鏄娇鐢―ocker Client涓嶥ocker Daemon寤虹珛閫氫俊锛屽苟鍙戦€佽姹傜粰鍚庤€呫€?/span>


鑰孌ocker Daemon浣滀负Docker鏋舵瀯涓殑涓讳綋閮ㄥ垎锛岄鍏堟彁渚汼erver鐨勫姛鑳戒娇鍏跺彲浠ユ帴鍙桪ocker Client鐨勮姹傦紱鑰屽悗Engine鎵цDocker鍐呴儴鐨勪竴绯诲垪宸ヤ綔锛屾瘡涓€椤瑰伐浣滈兘鏄互涓€涓狫ob鐨勫舰寮忕殑瀛樺湪銆?/span>


Job鐨勮繍琛岃繃绋嬩腑锛屽綋闇€瑕佸鍣ㄩ暅鍍忔椂锛屽垯浠嶥ocker Registry涓笅杞介暅鍍忥紝骞堕€氳繃闀滃儚绠$悊椹卞姩graphdriver灏嗕笅杞介暅鍍忎互Graph鐨勫舰寮忓瓨鍌紱褰撻渶瑕佷负Docker鍒涘缓缃戠粶鐜鏃讹紝閫氳繃缃戠粶绠$悊椹卞姩networkdriver鍒涘缓骞堕厤缃瓺ocker瀹瑰櫒缃戠粶鐜锛涘綋闇€瑕侀檺鍒禗ocker瀹瑰櫒杩愯璧勬簮鎴栨墽琛岀敤鎴锋寚浠ょ瓑鎿嶄綔鏃讹紝鍒欓€氳繃execdriver鏉ュ畬鎴愩€?/span>


鑰宭ibcontainer鏄竴椤圭嫭绔嬬殑瀹瑰櫒绠$悊鍖咃紝networkdriver浠ュ強execdriver閮芥槸閫氳繃libcontainer鏉ュ疄鐜板叿浣撳瀹瑰櫒杩涜鐨勬搷浣溿€傚綋鎵ц瀹岃繍琛屽鍣ㄧ殑鍛戒护鍚庯紝涓€涓疄闄呯殑Docker瀹瑰櫒灏卞浜庤繍琛岀姸鎬侊紝璇ュ鍣ㄦ嫢鏈夌嫭绔嬬殑鏂囦欢绯荤粺锛岀嫭绔嬪苟涓斿畨鍏ㄧ殑杩愯鐜绛夈€?/span>


3銆乨ocker鏋舵瀯3


鍐嶆潵鐪嬬湅鍙﹀涓€涓灦鏋勶紝杩欎釜涓灦鏋勫氨绠€鍗曟竻鏅版寚鏄庝簡server/client浜や簰锛屽鍣ㄥ拰闀滃儚銆佹暟鎹箣闂寸殑涓€浜涜仈绯汇€?/span>


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


杩欎釜鏋舵瀯鍥炬洿鍔犳竻鏅颁簡鏋舵瀯


docker daemon灏辨槸docker鐨勫畧鎶よ繘绋嬪嵆server绔紝鍙互鏄繙绋嬬殑锛屼篃鍙互鏄湰鍦扮殑锛岃繖涓笉鏄疌/S鏋舵瀯鍚楋紝瀹㈡埛绔疍ocker client 鏄€氳繃rest api杩涜閫氫俊銆?/span>


docker cli 鐢ㄦ潵绠$悊瀹瑰櫒鍜岄暅鍍忥紝瀹㈡埛绔彁渚涗竴涓彧璇婚暅鍍忥紝鐒跺悗閫氳繃闀滃儚鍙互鍒涘缓澶氫釜瀹瑰櫒锛岃繖浜涘鍣ㄥ彲浠ュ彧鏄竴涓猂FS锛圧oot file system鏍规枃浠剁郴缁燂級锛屼篃鍙互ishi涓€涓寘鍚簡鐢ㄦ埛搴旂敤鐨凴FS锛屽鍣ㄥ啀docker client涓彧鏄缁欒繘绋嬶紝涓や釜杩涚▼涔嬮棿浜掍笉鍙銆?/span>


鐢ㄦ埛涓嶈兘涓巗erver鐩存帴浜や簰锛屼絾鍙互閫氳繃涓庡鍣ㄨ繖涓ˉ姊佹潵浜や簰锛岀敱浜庢槸鎿嶄綔绯荤粺绾у埆鐨勮櫄鎷熸妧鏈紝涓棿鐨勬崯鑰楀嚑涔庡彲浠ヤ笉璁°€?/span>


涓夈€乨ocker鏋舵瀯2鍚勪釜妯″潡鐨勫姛鑳斤紙甯﹀畬鍠勶級


涓昏鐨勬ā鍧楁湁锛欴ocker Client銆丏ocker Daemon銆丏ocker Registry銆丟raph銆丏river銆乴ibcontainer浠ュ強Docker container銆傘€€銆€銆€


1銆乨ocker client


docker client 鏄痙ocker鏋舵瀯涓敤鎴风敤鏉ュ拰docker daemon寤虹珛閫氫俊鐨勫鎴风锛岀敤鎴蜂娇鐢ㄧ殑鍙墽琛屾枃浠朵负docker锛岄€氳繃docker鍛戒护琛屽伐鍏峰彲浠ュ彂璧蜂紬澶氱鐞哻ontainer鐨勮姹傘€?/span>


docker client鍙互閫氳繃涓€涓嬩笁瀹楁柟寮忓拰docker daemon寤虹珛閫氫俊锛歵cp://host:port;unix:path_to_socket;fd://socketfd銆傦紝docker client鍙互閫氳繃璁剧疆鍛戒护琛宖lag鍙傛暟鐨勫舰寮忚缃畨鍏ㄤ紶杈撳眰鍗忚(TLS)鐨勬湁鍏冲弬鏁帮紝淇濊瘉浼犺緭鐨勫畨鍏ㄦ€с€?/span>


docker client鍙戦€佸鍣ㄧ鐞嗚姹傚悗锛岀敱docker daemon鎺ュ彈骞跺鐞嗚姹傦紝褰揹ocker client 鎺ユ敹鍒拌繑鍥炵殑璇锋眰鐩稿簲骞剁畝鍗曞鐞嗗悗锛宒ocker client 涓€娆″畬鏁寸殑鐢熷懡鍛ㄦ湡灏辩粨鏉熶簡锛屽綋闇€瑕佺户缁彂閫佸鍣ㄧ鐞嗚姹傛椂锛岀敤鎴峰繀椤诲啀娆¢€氳繃docker鍙互鎵ц鏂囦欢鍒涘缓docker client銆?/span>


2銆乨ocker daemon


docker daemon 鏄痙ocker鏋舵瀯涓竴涓父椹诲湪鍚庡彴鐨勭郴缁熻繘绋嬶紝鍔熻兘鏄細鎺ユ敹澶勭悊docker client鍙戦€佺殑璇锋眰銆傝瀹堟姢杩涚▼鍦ㄥ悗鍙板惎鍔ㄤ竴涓猻erver锛宻erver璐熻浇鎺ュ彈docker client鍙戦€佺殑璇锋眰锛涙帴鍙楄姹傚悗锛宻erver閫氳繃璺敱涓庡垎鍙戣皟搴︼紝鎵惧埌鐩稿簲鐨刪andler鏉ユ墽琛岃姹傘€?/span>


docker daemon鍚姩鎵€浣跨敤鐨勫彲鎵ц鏂囦欢涔熶负docker锛屼笌docker client鍚姩鎵€浣跨敤鐨勫彲鎵ц鏂囦欢docker鐩稿悓锛屽湪docker鍛戒护鎵ц鏃讹紝閫氳繃浼犲叆鐨勫弬鏁版潵鍒ゅ埆docker daemon涓巇ocker client銆?/span>


docker daemon鐨勬灦鏋勫彲浠ュ垎涓猴細docker server銆乪ngine銆乯ob銆俤aemon


3銆乨ocker server


docker server鍦╠ocker鏋舵瀯涓椂涓撻棬鏈嶅姟浜巇ocker client鐨剆erver锛岃server鐨勫姛鑳芥椂锛氭帴鍙楀苟璋冨害鍒嗗彂docker client鍙戦€佺殑璇锋眰锛屾灦鏋勫浘濡備笅锛?/span>

銆€銆€銆€(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


鍦―ocker鐨勫惎鍔ㄨ繃绋嬩腑锛岄€氳繃鍖単orilla/mux锛坓olang鐨勭被搴撹В鏋愶級锛屽垱寤轰簡涓€涓猰ux.Router锛屾彁渚涜姹傜殑璺敱鍔熻兘銆傚湪Golang涓紝gorilla/mux鏄竴涓己澶х殑URL璺敱鍣ㄤ互鍙婅皟搴﹀垎鍙戝櫒銆傝mux.Router涓坊鍔犱簡浼楀鐨勮矾鐢遍」锛屾瘡涓€涓矾鐢遍」鐢盚TTP璇锋眰鏂规硶锛圥UT銆丳OST銆丟ET鎴朌ELETE锛夈€乁RL銆丠andler涓夐儴鍒嗙粍鎴愩€?/span>



鍦⊿erver鐨勬湇鍔¤繃绋嬩腑锛孲erver鍦╨istener涓婃帴鍙桪ocker Client鐨勮闂姹傦紝骞跺垱寤轰竴涓叏鏂扮殑goroutine鏉ユ湇鍔¤璇锋眰銆傚湪goroutine涓紝棣栧厛璇诲彇璇锋眰鍐呭锛岀劧鍚庡仛瑙f瀽宸ヤ綔锛屾帴鐫€鎵惧埌鐩稿簲鐨勮矾鐢遍」锛岄殢鍚庤皟鐢ㄧ浉搴旂殑Handler鏉ュ鐞嗚璇锋眰锛屾渶鍚嶩andler澶勭悊瀹岃姹備箣鍚庡洖澶嶈璇锋眰銆?/span>


闇€瑕佹敞鎰忕殑鏄細Docker Server鐨勮繍琛屽湪Docker鐨勫惎鍔ㄨ繃绋嬩腑锛屾槸闈犱竴涓悕涓衡€漵erveapi鈥濈殑job鐨勮繍琛屾潵瀹屾垚鐨勩€傚師鍒欎笂锛孌ocker Server鐨勮繍琛屾槸浼楀job涓殑涓€涓紝浣嗘槸涓轰簡寮鸿皟Docker Server鐨勯噸瑕佹€т互鍙婁负鍚庣画job鏈嶅姟鐨勯噸瑕佺壒鎬э紝灏嗚鈥漵erveapi鈥濈殑job鍗曠嫭鎶界鍑烘潵鍒嗘瀽锛岀悊瑙d负Docker Server銆?/span>


4銆乪ngine


Engine鏄疍ocker鏋舵瀯涓殑杩愯寮曟搸锛屽悓鏃朵篃Docker杩愯鐨勬牳蹇冩ā鍧椼€傚畠鎵紨Docker container瀛樺偍浠撳簱鐨勮鑹诧紝骞朵笖閫氳繃鎵цjob鐨勬柟寮忔潵鎿嶇旱绠$悊杩欎簺瀹瑰櫒銆?/span>

鍦‥ngine鏁版嵁缁撴瀯鐨勮璁′笌瀹炵幇杩囩▼涓紝鏈変竴涓猦andler瀵硅薄銆傝handler瀵硅薄瀛樺偍鐨勯兘鏄叧浜庝紬澶氱壒瀹歫ob鐨刪andler澶勭悊璁块棶銆備妇渚嬭鏄庯紝Engine鐨刪andler瀵硅薄涓湁涓€椤逛负锛歿鈥渃reate鈥? daemon.ContainerCreate,}锛屽垯璇存槑褰撳悕涓衡€漜reate鈥濈殑job鍦ㄨ繍琛屾椂锛屾墽琛岀殑鏄痙aemon.ContainerCreate鐨刪andler銆?/span>


5銆乯ob


涓€涓狫ob鍙互璁や负鏄疍ocker鏋舵瀯涓璄ngine鍐呴儴鏈€鍩烘湰鐨勫伐浣滄墽琛屽崟鍏冦€侱ocker鍙互鍋氱殑姣忎竴椤瑰伐浣滐紝閮藉彲浠ユ娊璞′负涓€涓猨ob銆備緥濡傦細鍦ㄥ鍣ㄥ唴閮ㄨ繍琛屼竴涓繘绋嬶紝杩欐槸涓€涓猨ob锛涘垱寤轰竴涓柊鐨勫鍣紝杩欐槸涓€涓猨ob锛屼粠Internet涓婁笅杞戒竴涓枃妗o紝杩欐槸涓€涓猨ob锛涘寘鎷箣鍓嶅湪Docker Server閮ㄥ垎璇磋繃鐨勶紝鍒涘缓Server鏈嶅姟浜嶩TTP鐨凙PI锛岃繖涔熸槸涓€涓猨ob锛岀瓑绛夈€?/span>


Job鐨勮璁¤€咃紝鎶奐ob璁捐寰椾笌Unix杩涚▼鐩镐豢銆傛瘮濡傝锛欽ob鏈変竴涓悕绉帮紝鏈夊弬鏁帮紝鏈夌幆澧冨彉閲忥紝鏈夋爣鍑嗙殑杈撳叆杈撳嚭锛屾湁閿欒澶勭悊锛屾湁杩斿洖鐘舵€佺瓑銆?/span>


6銆乨ocker registry


Docker Registry鏄竴涓瓨鍌ㄥ鍣ㄩ暅鍍忕殑浠撳簱銆傝€屽鍣ㄩ暅鍍忔槸鍦ㄥ鍣ㄨ鍒涘缓鏃讹紝琚姞杞界敤鏉ュ垵濮嬪寲瀹瑰櫒鐨勬枃浠舵灦鏋勪笌鐩綍銆?/span>


鍦―ocker鐨勮繍琛岃繃绋嬩腑锛孌ocker Daemon浼氫笌Docker Registry閫氫俊锛屽苟瀹炵幇鎼滅储闀滃儚銆佷笅杞介暅鍍忋€佷笂浼犻暅鍍忎笁涓姛鑳斤紝杩欎笁涓姛鑳藉搴旂殑job鍚嶇О鍒嗗埆涓衡€漵earch鈥濓紝鈥漰ull鈥?涓?鈥減ush鈥濄€?/span>


鍏朵腑锛屽湪Docker鏋舵瀯涓紝Docker鍙互浣跨敤鍏湁鐨凞ocker Registry锛屽嵆澶у鐔熺煡鐨凞ocker Hub锛屽姝や竴鏉ワ紝Docker鑾峰彇瀹瑰櫒闀滃儚鏂囦欢鏃讹紝蹇呴』閫氳繃浜掕仈缃戣闂瓺ocker Hub锛涘悓鏃禗ocker涔熷厑璁哥敤鎴锋瀯寤烘湰鍦扮鏈夌殑Docker Registry锛岃繖鏍峰彲浠ヤ繚璇佸鍣ㄩ暅鍍忕殑鑾峰彇鍦ㄥ唴缃戝畬鎴愩€?/span>


7銆丟raph


Graph鍦―ocker鏋舵瀯涓壆婕斿凡涓嬭浇瀹瑰櫒闀滃儚鐨勪繚绠¤€咃紝浠ュ強宸蹭笅杞藉鍣ㄩ暅鍍忎箣闂村叧绯荤殑璁板綍鑰呫€備竴鏂归潰锛孏raph瀛樺偍鐫€鏈湴鍏锋湁鐗堟湰淇℃伅鐨勬枃浠剁郴缁熼暅鍍忥紝鍙︿竴鏂归潰涔熼€氳繃GraphDB璁板綍鐫€鎵€鏈夋枃浠剁郴缁熼暅鍍忓郊姝や箣闂寸殑鍏崇郴銆?/span>


Graph鐨勬灦鏋勫涓嬶細


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


鍏朵腑锛孏raphDB鏄竴涓瀯寤哄湪SQLite涔嬩笂鐨勫皬鍨嬪浘鏁版嵁搴擄紝瀹炵幇浜嗚妭鐐圭殑鍛藉悕浠ュ強鑺傜偣涔嬮棿鍏宠仈鍏崇郴鐨勮褰曘€傚畠浠呬粎瀹炵幇浜嗗ぇ澶氭暟鍥炬暟鎹簱鎵€鎷ユ湁鐨勪竴涓皬鐨勫瓙闆嗭紝浣嗘槸鎻愪緵浜嗙畝鍗曠殑鎺ュ彛琛ㄧず鑺傜偣涔嬮棿鐨勫叧绯汇€?/span>


鍚屾椂鍦℅raph鐨勬湰鍦扮洰褰曚腑锛屽叧浜庢瘡涓€涓殑瀹瑰櫒闀滃儚锛屽叿浣撳瓨鍌ㄧ殑淇℃伅鏈夛細璇ュ鍣ㄩ暅鍍忕殑鍏冩暟鎹紝瀹瑰櫒闀滃儚鐨勫ぇ灏忎俊鎭紝浠ュ強璇ュ鍣ㄩ暅鍍忔墍浠h〃鐨勫叿浣搑ootfs銆?/span>


8銆乨river


Driver鏄疍ocker鏋舵瀯涓殑椹卞姩妯″潡銆傞€氳繃Driver椹卞姩锛孌ocker鍙互瀹炵幇瀵笵ocker瀹瑰櫒鎵ц鐜鐨勫畾鍒躲€傜敱浜嶥ocker杩愯鐨勭敓鍛藉懆鏈熶腑锛屽苟闈炵敤鎴锋墍鏈夌殑鎿嶄綔閮芥槸閽堝Docker瀹瑰櫒鐨勭鐞嗭紝鍙﹀杩樻湁鍏充簬Docker杩愯淇℃伅鐨勮幏鍙栵紝Graph鐨勫瓨鍌ㄤ笌璁板綍绛夈€傚洜姝わ紝涓轰簡灏咲ocker瀹瑰櫒鐨勭鐞嗕粠Docker Daemon鍐呴儴涓氬姟閫昏緫涓尯鍒嗗紑鏉ワ紝璁捐浜咲river灞傞┍鍔ㄦ潵鎺ョ鎵€鏈夎繖閮ㄥ垎璇锋眰銆?/span>


鍦―ocker Driver鐨勫疄鐜颁腑锛屽彲浠ュ垎涓轰互涓嬩笁绫婚┍鍔細graphdriver銆乶etworkdriver鍜宔xecdriver銆?/span>


graphdriver涓昏鐢ㄤ簬瀹屾垚瀹瑰櫒闀滃儚鐨勭鐞嗭紝鍖呮嫭瀛樺偍涓庤幏鍙栥€傚嵆褰撶敤鎴烽渶瑕佷笅杞芥寚瀹氱殑瀹瑰櫒闀滃儚鏃讹紝graphdriver灏嗗鍣ㄩ暅鍍忓瓨鍌ㄥ湪鏈湴鐨勬寚瀹氱洰褰曪紱鍚屾椂褰撶敤鎴烽渶瑕佷娇鐢ㄦ寚瀹氱殑瀹瑰櫒闀滃儚鏉ュ垱寤哄鍣ㄧ殑rootfs鏃讹紝graphdriver浠庢湰鍦伴暅鍍忓瓨鍌ㄧ洰褰曚腑鑾峰彇鎸囧畾鐨勫鍣ㄩ暅鍍忋€?/span>


鍦╣raphdriver鐨勫垵濮嬪寲杩囩▼涔嬪墠锛屾湁4绉嶆枃浠剁郴缁熸垨绫绘枃浠剁郴缁熷湪鍏跺唴閮ㄦ敞鍐岋紝瀹冧滑鍒嗗埆鏄痑ufs銆乥trfs銆乿fs鍜宒evmapper銆傝€孌ocker鍦ㄥ垵濮嬪寲涔嬫椂锛岄€氳繃鑾峰彇绯荤粺鐜鍙橀噺鈥滵OCKER_DRIVER鈥濇潵鎻愬彇鎵€浣跨敤driver鐨勬寚瀹氱被鍨嬨€傝€屼箣鍚庢墍鏈夌殑graph鎿嶄綔锛岄兘浣跨敤璇river鏉ユ墽琛屻€?/span>


graphdriver鐨勬灦鏋勫涓嬶細


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


networkdriver鐨勭敤閫旀槸瀹屾垚Docker瀹瑰櫒缃戠粶鐜鐨勯厤缃紝鍏朵腑鍖呮嫭Docker鍚姩鏃朵负Docker鐜鍒涘缓缃戞ˉ锛汥ocker瀹瑰櫒鍒涘缓鏃朵负鍏跺垱寤轰笓灞炶櫄鎷熺綉鍗¤澶囷紱浠ュ強涓篋ocker瀹瑰櫒鍒嗛厤IP銆佺鍙e苟涓庡涓绘満鍋氱鍙f槧灏勶紝璁剧疆瀹瑰櫒闃茬伀澧欑瓥鐣ョ瓑銆俷etworkdriver鐨勬灦鏋勫涓嬶細


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


execdriver浣滀负Docker瀹瑰櫒鐨勬墽琛岄┍鍔紝璐熻矗鍒涘缓瀹瑰櫒杩愯鍛藉悕绌洪棿锛岃礋璐e鍣ㄨ祫婧愪娇鐢ㄧ殑缁熻涓庨檺鍒讹紝璐熻矗瀹瑰櫒鍐呴儴杩涚▼鐨勭湡姝h繍琛岀瓑銆傚湪execdriver鐨勫疄鐜拌繃绋嬩腑锛屽師鍏堝彲浠ヤ娇鐢↙XC椹卞姩璋冪敤LXC鐨勬帴鍙o紝鏉ユ搷绾靛鍣ㄧ殑閰嶇疆浠ュ強鐢熷懡鍛ㄦ湡锛岃€岀幇鍦╡xecdriver榛樿浣跨敤native椹卞姩锛屼笉渚濊禆浜嶭XC銆?/span>


鍏蜂綋浣撶幇鍦―aemon鍚姩杩囩▼涓姞杞界殑ExecDriverflag鍙傛暟锛岃鍙傛暟鍦ㄩ厤缃枃浠跺凡缁忚璁句负鈥漬ative鈥濄€傝繖鍙互璁や负鏄疍ocker鍦?.2鐗堟湰涓婁竴涓緢澶х殑鏀瑰彉锛屾垨鑰呰Docker瀹炵幇璺ㄥ钩鍙扮殑涓€涓厛鍏嗐€俥xecdriver鏋舵瀯濡備笅锛?/span>


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


9銆乴ibcontainer


libcontainer鏄疍ocker鏋舵瀯涓竴涓娇鐢℅o璇█璁捐瀹炵幇鐨勫簱锛岃璁″垵琛锋槸甯屾湜璇ュ簱鍙互涓嶄緷闈犱换浣曚緷璧栵紝鐩存帴璁块棶鍐呮牳涓笌瀹瑰櫒鐩稿叧鐨凙PI銆?/span>


姝f槸鐢变簬libcontainer鐨勫瓨鍦紝Docker鍙互鐩存帴璋冪敤libcontainer锛岃€屾渶缁堟搷绾靛鍣ㄧ殑namespace銆乧groups銆乤pparmor銆佺綉缁滆澶囦互鍙婇槻鐏瑙勫垯绛夈€傝繖涓€绯诲垪鎿嶄綔鐨勫畬鎴愰兘涓嶉渶瑕佷緷璧朙XC鎴栬€呭叾浠栧寘銆俵ibcontainer鏋舵瀯濡備笅锛?/span>


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


鍙﹀锛宭ibcontainer鎻愪緵浜嗕竴鏁村鏍囧噯鐨勬帴鍙f潵婊¤冻涓婂眰瀵瑰鍣ㄧ鐞嗙殑闇€姹傘€傛垨鑰呰锛宭ibcontainer灞忚斀浜咲ocker涓婂眰瀵瑰鍣ㄧ殑鐩存帴绠$悊銆傚張鐢变簬libcontainer浣跨敤Go杩欑璺ㄥ钩鍙扮殑璇█寮€鍙戝疄鐜帮紝涓旀湰韬張鍙互琚笂灞傚绉嶄笉鍚岀殑缂栫▼璇█璁块棶锛屽洜姝ゅ緢闅捐锛屾湭鏉ョ殑Docker灏变竴瀹氫細绱х揣鍦板拰Linux鎹嗙粦鍦ㄤ竴璧枫€傝€屼簬姝ゅ悓鏃讹紝Microsoft鍦ㄥ叾钁楀悕浜戣绠楀钩鍙癆zure涓紝涔熸坊鍔犱簡瀵笵ocker鐨勬敮鎸侊紝鍙Docker鐨勫紑鏀剧▼搴︿笌涓氱晫鐨勭伀鐑害銆?/span>


鏆備笉璋圖ocker锛岀敱浜巐ibcontainer鐨勫姛鑳戒互鍙婂叾鏈韩涓庣郴缁熺殑鏉捐€﹀悎鐗规€э紝寰堟湁鍙兘浼氬湪鍏朵粬浠ュ鍣ㄤ负鍘熷瀷鐨勫钩鍙板嚭鐜帮紝鍚屾椂涔熷緢鏈夊彲鑳藉偓鐢熷嚭浜戣绠楅鍩熷叏鏂扮殑椤圭洰銆?/span>


10銆乨ocker container


Docker container锛圖ocker瀹瑰櫒锛夋槸Docker鏋舵瀯涓湇鍔′氦浠樼殑鏈€缁堜綋鐜板舰寮忋€?/span>

Docker鎸夌収鐢ㄦ埛鐨勯渶姹備笌鎸囦护锛岃鍒剁浉搴旂殑Docker瀹瑰櫒锛?/span>


  • 鐢ㄦ埛閫氳繃鎸囧畾瀹瑰櫒闀滃儚锛屼娇寰桪ocker瀹瑰櫒鍙互鑷畾涔塺ootfs绛夋枃浠剁郴缁燂紱

  • 鐢ㄦ埛閫氳繃鎸囧畾璁$畻璧勬簮鐨勯厤棰濓紝浣垮緱Docker瀹瑰櫒浣跨敤鎸囧畾鐨勮绠楄祫婧愶紱

  • 鐢ㄦ埛閫氳繃閰嶇疆缃戠粶鍙婂叾瀹夊叏绛栫暐锛屼娇寰桪ocker瀹瑰櫒鎷ユ湁鐙珛涓斿畨鍏ㄧ殑缃戠粶鐜锛?/span>

  • 鐢ㄦ埛閫氳繃鎸囧畾杩愯鐨勫懡浠わ紝浣垮緱Docker瀹瑰櫒鎵ц鎸囧畾鐨勫伐浣溿€?/span>


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


鍥涖€乨ocker绠€鍗曚娇鐢?/span>


1銆佸畨瑁?/span>


yum install docker -y
systemctl enable docker
systemctl start docker


娉ㄦ剰锛氬惎鍔ㄥ墠搴斿綋璁剧疆婧?/span>


vim /usr/lib/systemd/system/docker.service


杩欓噷璁剧疆闃块噷鐨勶紝娉ㄥ唽闃块噷浜戣处鎴峰彿姣忎釜鐢ㄦ埛閮芥湁锛?/span>


[root@web1 ~]# vim /usr/lib/systemd/system/docker.service

[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target
Wants=docker-storage-setup.service
Requires=docker-cleanup.timer

[Service]
Type=notify
NotifyAccess=main
EnvironmentFile=-/run/containers/registries.conf
EnvironmentFile=-/etc/sysconfig/docker
EnvironmentFile=-/etc/sysconfig/docker-storage
EnvironmentFile=-/etc/sysconfig/docker-network
Environment=GOTRACEBACK=crash
Environment=DOCKER_HTTP_HOST_COMPAT=1
Environment=PATH=/usr/libexec/docker:/usr/bin:/usr/sbin
ExecStart=/usr/bin/dockerd-current --registry-mirror=https://rfcod7oz.mirror.aliyuncs.com #杩欎釜鍊煎彲浠ョ櫥闄嗛樋閲屼簯璐﹀彿璇峰弬鑰冧笅鍥?/span>
--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current
--default-runtime=docker-runc
--exec-opt native.cgroupdriver=systemd
--userland-proxy-path=/usr/libexec/docker/docker-proxy-current
--init-path=/usr/libexec/docker/docker-init-current
--seccomp-profile=/etc/docker/seccomp.json
$OPTIONS
$DOCKER_STORAGE_OPTIONS
$DOCKER_NETWORK_OPTIONS
$ADD_REGISTRY
$BLOCK_REGISTRY
$INSECURE_REGISTRY
$REGISTRIES
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
TimeoutStartSec=0
Restart=on-abnormal
KillMode=process

[Install]
WantedBy=multi-user.target


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮


2銆乨ocker鐗堟湰鏌ヨ


[root@web1 ~]# docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-96.gitb2f74b2.el7.centos.x86_64
Go version: go1.10.3
Git commit: b2f74b2/1.13.1
Built: Wed May 1 14:55:20 2019
OS/Arch: linux/amd64

Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-96.gitb2f74b2.el7.centos.x86_64
Go version: go1.10.3
Git commit: b2f74b2/1.13.1
Built: Wed May 1 14:55:20 2019
OS/Arch: linux/amd64
Experimental: false


3銆佹悳绱笅杞介暅鍍?/span>


docker pull alpine銆€銆€銆€銆€銆€銆€銆€銆€銆€銆€#涓嬭浇闀滃儚
docker search nginx銆€銆€銆€銆€銆€銆€銆€銆€銆€ #鏌ョ湅闀滃儚
docker pull nginx


4銆佹煡鐪嬪凡缁忎笅杞界殑闀滃儚


[root@web1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
zxg/my_nginx v1 b164f4c07c64 8 days ago 126 MB
zxg/my_nginx latest f07837869dfc 8 days ago 126 MB
docker.io/nginx latest e445ab08b2be 2 weeks ago 126 MB
docker.io/alpine latest b7b28af77ffe 3 weeks ago 5.58 MB
docker.io/centos latest 9f38484d220f 4 months ago 202 MB
[root@web1 ~]#


5銆佸鍑洪暅鍍?/span>

docker  save nginx >/tmp/nginx.tar.gz


6銆佸垹闄ら暅鍍?/span>

docker rmi -f nginx


7銆佸鍏ラ暅鍍?/span>


docker load </tmp/nginx.tar.gz


8銆侀粯璁ら厤缃枃浠?/span>


vim /usr/lib/systemd/system/docker.service


[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target
Wants=docker-storage-setup.service
Requires=docker-cleanup.timer

[Service]
Type=notify
NotifyAccess=main
EnvironmentFile=-/run/containers/registries.conf
EnvironmentFile=-/etc/sysconfig/docker
EnvironmentFile=-/etc/sysconfig/docker-storage
EnvironmentFile=-/etc/sysconfig/docker-network
Environment=GOTRACEBACK=crash
Environment=DOCKER_HTTP_HOST_COMPAT=1
Environment=PATH=/usr/libexec/docker:/usr/bin:/usr/sbin
ExecStart=/usr/bin/dockerd-current --registry-mirror=https://rfcod7oz.mirror.aliyuncs.com
--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current
--default-runtime=docker-runc
--exec-opt native.cgroupdriver=systemd
--userland-proxy-path=/usr/libexec/docker/docker-proxy-current
--init-path=/usr/libexec/docker/docker-init-current
--seccomp-profile=/etc/docker/seccomp.json
$OPTIONS
$DOCKER_STORAGE_OPTIONS
$DOCKER_NETWORK_OPTIONS
$ADD_REGISTRY
$BLOCK_REGISTRY
$INSECURE_REGISTRY
$REGISTRIES
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
TimeoutStartSec=0
Restart=on-abnormal
KillMode=process

[Install]
WantedBy=multi-user.target
~
~
~
~


濡傛灉鏇存敼瀛樺偍鐩綍灏辨坊鍔犮€€


--graph=/opt/docker


濡傛灉鏇存敼DNS鈥斺€旈粯璁ら噰鐢ㄥ涓绘満鐨刣ns


--dns=xxxx鐨勬柟寮忔寚瀹?/code>


9銆佽繍琛宧ello world


杩欓噷鐢╟entos闀滃儚echo涓€涓猦ello word


[root@web1 overlay2]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
zxg/my_nginx v1 b164f4c07c64 8 days ago 126 MB
zxg/my_nginx latest f07837869dfc 8 days ago 126 MB
docker.io/nginx latest e445ab08b2be 2 weeks ago 126 MB
docker.io/alpine latest b7b28af77ffe 3 weeks ago 5.58 MB
docker.io/centos latest 9f38484d220f 4 months ago 202 MB
[root@web1 overlay2]# docker run centos echo "hello world"
hello world
[root@web1 overlay2]#


10銆佽繍琛屼竴涓鍣?run


[root@web1 overlay2]# docker run -it alpine sh #杩愯骞惰繘鍏lpine
/ #
/ #
/ #
/ #
/ #
/ # ls
bin etc lib mnt proc run srv tmp var
dev home media opt root sbin sys usr
/ # cd tmp
/tmp # exit


鍚庡彴杩愯锛?d鍚庡彴杩愯锛夛紙--name娣诲姞涓€涓悕瀛楋級


[root@web1 overlay2]# docker run -it -d --name test1 alpine
ac46c019b800d34c37d4f9dcd56c974cb82eca3acf185e5f8f80c8a60075e343
[root@web1 overlay2]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ac46c019b800 alpine "/bin/sh" 5 seconds ago Up 3 seconds test1
[root@web1 overlay2]#


杩樻湁涓€绉?rm鍙傛暟锛宑trl+c鍚庡氨鍒犻櫎锛屽彲浠ユ祴璇曠幆澧冪敤锛岀敓鎴愮幆澧冪敤鐨勫皯


[root@web1 overlay2]# docker run -it --rm --name centos nginx
^C[root@web1 overlay2]#
##鍙﹀紑涓€涓獥鍙?br>[root@web1 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3397b96ea7bd nginx "nginx -g 'daemon ..." 27 seconds ago Up 25 seconds 80/tcp centos
ac46c019b800 alpine "/bin/sh" 4 minutes ago Up 4 minutes test1
[root@web1 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ac46c019b800 alpine "/bin/sh" 4 minutes ago Up 4 minutes test1
[root@web1 ~]#


11銆佸浣曡繘鍏ュ鍣?/span>


涓夌鏂规硶锛屼笂闈㈠凡缁忔紨绀轰簡涓€绉?/span>


绗竴绉嶏紝闇€瑕佸鍣ㄦ湰韬殑pid鍙妘til-linux锛屼笉鎺ㄨ崘锛屾殏鏃朵笉婕旂ず浜?/span>


绗簩绉嶏紝涓嶅垎閰峛ash缁堢鐨勪竴绉嶅疄鏂芥搷浣滐紝涓嶆帹鑽愶紝杩欑鎿嶄綔濡傛灉鍦ㄥ紑涓€涓獥鍙d篃鑳界湅鍒版搷浣滅殑鎸囦护锛屾墍鏈変汉閮借兘鐪嬪埌銆?/span>


[root@web1 overlay2]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9fc796e928d7 nginx "sh" 2 minutes ago Up 8 seconds 80/tcp mynginx
ac46c019b800 alpine "/bin/sh" 12 minutes ago Up 12 minutes test1
[root@web1 overlay2]# docker attach mynginx

#
#
#
#
# ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
# exit銆€銆€
[root@web1 overlay2]# docker attach mynginx
You cannot attach to a stopped container, start it first
[root@web1 overlay2]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ac46c019b800 alpine "/bin/sh" 13 minutes ago Up 13 minutes test1
[root@web1 overlay2]#


绗笁绉嶏細exec鏂瑰紡锛岀粓绔椂鍒嗗紑鐨勶紝鎺ㄨ崘


[root@web1 overlay2]# docker exec -it mynginx sh
#
#
#
# ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
# exit
[root@web1 overlay2]#
[root@web1 overlay2]#
[root@web1 overlay2]#
[root@web1 overlay2]# docker pa
docker: 'pa' is not a docker command.
See 'docker --help'
[root@web1 overlay2]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6fc2d091cfe9 nginx "nginx -g 'daemon ..." 45 seconds ago Up 43 seconds 80/tcp mynginx
ac46c019b800 alpine "/bin/sh" 16 minutes ago Up 16 minutes test1


12銆佹煡鐪媎ocker杩涚▼鍙婂垹闄ゅ鍣?/span>


涓婇潰宸茬粡婕旂ず锛?/span>


[root@web1 overlay2]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9fc796e928d7 nginx "sh" 2 minutes ago Up 8 seconds 80/tcp mynginx
ac46c019b800 alpine "/bin/sh" 12 minutes ago Up 12 minutes test1


[root@web1 overlay2]# docker ps -a 銆€銆€銆€銆€銆€銆€#-a :鏄剧ず鎵€鏈夌殑瀹瑰櫒锛屽寘鎷湭杩愯鐨?/span>
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9fc796e928d7 nginx "sh" 4 minutes ago Exited (0) About a minute ago mynginx
ac46c019b800 alpine "/bin/sh" 15 minutes ago Up 15 minutes test1
3bf234febeaa alpine "sh" 17 minutes ago Exited (0) 16 minutes ago youthful_lumiere
ab113c63f0b4 centos "echo 'hello world'" 31 minutes ago Exited (0) 31 minutes ago infallible_torvalds
b326027dcf42 zxg/my_nginx "nginx" 8 days ago Exited (0) 8 days ago my_nginx
4f1f1ca319f2 centos "bash" 8 days ago Exited (137) 8 days ago musing_lichterman
64b4e32991c7 nginx "nginx -g 'daemon ..." 12 days ago Exited (0) 12 days ago mynginx1
aee506fe7b5a alpine "sh" 12 days ago Created infallible_haibt
70620c73b9a0 alpine "sh" 12 days ago Created gallant_volhard
7655cbf87bb0 alpine "sh" 12 days ago Created agitated_brahmagupta
33fb949372e8 fce289e99eb9 "/hello" 12 days ago Created elastic_dijkstra
9de47616aea4 fce289e99eb9 "/hello" 13 days ago Created confident_fermi
[root@web1 overlay2]# docker rm 9fc796e928d7 #rm鏃跺垹闄や竴涓垨澶氫釜瀹瑰櫒
9fc796e928d7


13銆佹煡鐪嬪鍣ㄨ缁嗕俊鎭?/span>



[root@web1 overlay2]# docker inspect mynginx
[
{
"Id": "6fc2d091cfe9b0484da3e70db842446bbdfeb7f5e5409c2e40ae21b99498d010",
"Created": "2019-08-07T08:57:48.864538933Z",
"Path": "nginx",
"Args": [
"-g",
"daemon off;"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 119948,
"ExitCode": 0,
"Error": "",
"StartedAt": "2019-08-07T08:57:49.417992182Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:e445ab08b2be8b178655b714f89e5db9504f67defd5c7408a00bade679a50d44",
"ResolvConfPath": "/var/lib/docker/containers/6fc2d091cfe9b0484da3e70db842446bbdfeb7f5e5409c2e40ae21b99498d010/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/6fc2d091cfe9b0484da3e70db842446bbdfeb7f5e5409c2e40ae21b99498d010/hostname",
"HostsPath": "/var/lib/docker/containers/6fc2d091cfe9b0484da3e70db842446bbdfeb7f5e5409c2e40ae21b99498d010/hosts",
"LogPath": "",
"Name": "/mynginx",
"RestartCount": 0,
"Driver": "overlay2",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "journald",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "docker-runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": -1,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
},
"GraphDriver": {
"Name": "overlay2",
"Data": {
"LowerDir": "/var/lib/docker/overlay2/937140af0aee6c43f04c2d7b72e6b5451a44fef921417e8236d9fe01e9286c7a-init/diff:/var/lib/docker/overlay2/d8e95505fc3894eb30b48e4b0f48ab5e89d99c09a07c79c0b057c611621e31eb/diff:/var/lib/docker/overlay2/b2a6a25974bf17398b698a27208711574be3c69a2cd06658bbe838359f373a27/diff:/var/lib/docker/overlay2/d4610bc89b3ba8ad6ab30ea895fc3a06efff15db493d86ac9bc100e04abbab67/diff",
"MergedDir": "/var/lib/docker/overlay2/937140af0aee6c43f04c2d7b72e6b5451a44fef921417e8236d9fe01e9286c7a/merged",
"UpperDir": "/var/lib/docker/overlay2/937140af0aee6c43f04c2d7b72e6b5451a44fef921417e8236d9fe01e9286c7a/diff",
"WorkDir": "/var/lib/docker/overlay2/937140af0aee6c43f04c2d7b72e6b5451a44fef921417e8236d9fe01e9286c7a/work"
}
},
"Mounts": [],
"Config": {
"Hostname": "6fc2d091cfe9",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": true,
"OpenStdin": true,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NGINX_VERSION=1.17.2",
"NJS_VERSION=0.3.3",
"PKG_RELEASE=1~buster"
],
"Cmd": [
"nginx",
"-g",
"daemon off;"
],
"ArgsEscaped": true,
"Image": "nginx",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"maintainer": "NGINX Docker Maintainers <docker-maint@nginx.com>"
},
"StopSignal": "SIGTERM"
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "3ece36008fbc5f3f46d3d251cf803c1478cc14032d74a36747e4ed8a115b81df",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"80/tcp": null
},
"SandboxKey": "/var/run/docker/netns/3ece36008fbc",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "898de81d97d54d2b60aeb6cc77ef1b4f9b481d1b72f542faa496494594024eac",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.3", 銆€銆€銆€銆€銆€銆€#鐪嬪埌ip鍦板潃
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:03",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "2edae9131e77500a56d251b94ab2cdf0bc86f8df9f2453fa46bf4bab2f7be99f",
"EndpointID": "898de81d97d54d2b60aeb6cc77ef1b4f9b481d1b72f542faa496494594024eac",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.3",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:03"
}
}
}
}
]
[root@web1 overlay2]# curl 172.17.0.1銆€銆€銆€銆€銆€銆€#璁块棶涓€涓?/span>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Test Page for the Nginx HTTP Server on Fedora</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
/*<![CDATA[*/
body {
background-color: #fff;
color: #000;
font-size: 0.9em;
font-family: sans-serif,helvetica;
margin: 0;
padding: 0;
}
:link {
color: #c00;
}
:visited {
color: #c00;
}
a:hover {
color: #f50;
}
h1 {
text-align: center;
margin: 0;
padding: 0.6em 2em 0.4em;
background-color: #294172;
color: #fff;
font-weight: normal;
font-size: 1.75em;
border-bottom: 2px solid #000;
}
h1 strong {
font-weight: bold;
font-size: 1.5em;
}
h2 {
text-align: center;
background-color: #3C6EB4;
font-size: 1.1em;
font-weight: bold;
color: #fff;
margin: 0;
padding: 0.5em;
border-bottom: 2px solid #294172;
}
hr {
display: none;
}
.content {
padding: 1em 5em;
}
.alert {
border: 2px solid #000;
}

img {
border: 2px solid #fff;
padding: 2px;
margin: 2px;
}
a:hover img {
border: 2px solid #294172;
}
.logos {
margin: 1em;
text-align: center;
}
/*]]>*/
</style>
</head>

<body>
<h1>Welcome to <strong>nginx</strong> on Fedora!</h1>

<div class="content">
<p>This page is used to test the proper operation of the
<strong>nginx</strong> HTTP server after it has been
installed. If you can read this page, it means that the
web server installed at this site is working
properly.</p>

<div class="alert">
<h2>Website Administrator</h2>
<div class="content">
<p>This is the default <tt>index.html</tt> page that
is distributed with <strong>nginx</strong> on
Fedora. It is located in
<tt>/usr/share/nginx/html</tt>.</p>

<p>You should now put your content in a location of
your choice and edit the <tt>root</tt> configuration
directive in the <strong>nginx</strong>
configuration file
<tt>/etc/nginx/nginx.conf</tt>.</p>

</div>
</div>

<div class="logos">
<a href="http://nginx.net/"><img
src="nginx-logo.png"
alt="[ Powered by nginx ]"
width="121" height="32" /></a>

<a href="http://fedoraproject.org/"><img
src="poweredby.png"
alt="[ Powered by Fedora ]"
width="88" height="31" /></a>
</div>
</div>
</body>
</html>
[root@web1 overlay2]#


14銆佹煡鐪嬫棩蹇?/span>


-f  鎸傝捣杩欎釜缁堢锛屽姩鎬佹煡鐪嬫棩蹇?/span>


[root@web1 ~]# docker logs -f mynginx


鍙傝€冩枃绔狅細


(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮

 
   
   
 
(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮

鎺?/span>鑽?/span>闃?/span>璇?/span>锛?/span>


~


3銆?/span>


4銆?/span>




6


7銆?/span>

- END -
鏈€杩戞暣鐞嗕竴浠借祫鏂?/span>銆婄▼搴忓憳瀛︿範鎵嬪唽銆?/span>锛岃鐩栦簡 Java鎶€鏈€侀潰璇曢绮鹃€夈€佹搷浣滅郴缁熷熀纭€鐭ヨ瘑銆佽绠楁満鍩虹鐭ヨ瘑銆丩inux鏁欑▼銆佽绠楁満缃戠粶绛夌瓑銆?/span>
鑾峰彇鏂瑰紡锛氱偣鈥?nbsp;鍦ㄧ湅锛屽叧娉ㄥ叕浼楀彿 Java澶ф暟鎹慨鐐间箣閬?/strong> 骞跺洖澶?/span> PDF 棰嗗彇锛屾洿澶氬唴瀹归檰缁涓娿€?/span>

闀挎寜璇嗗埆涓嬫柟浜岀淮鐮佸叧娉ㄥ悗鍥炲鍏抽敭瀛? PDF 棰嗗彇


鍏虫敞 java澶ф暟鎹慨鐐间箣閬?/span>

    姣忓ぉ瀛︿範java鎶€鏈紝浣犳兂瀛︾殑Java鐭ヨ瘑杩欓噷閮芥湁!

濡傛灉浣犺寰楁枃绔犱笉閿欙紝鏂囨湯鐨勮禐 馃憤 鍙堝洖鏉ュ暒锛? 璁板緱缁欐垜銆岀偣璧炪€嶅拰銆屽湪鐪嬨€嶅摝锝?/strong>

以上是关于(瓒呯骇璇︾粏)Docker 鏋舵瀯鍘熺悊鍙婄畝鍗曚娇鐢╗鏈夐厤濂楄棰慮的主要内容,如果未能解决你的问题,请参考以下文章

閫氳繃杩?2寮犳墜缁樺浘锛屾悶鎳備粈涔堟槸寰湇鍔℃灦鏋?/h1>

涓轰粈涔堥潰璇曞畼鍠滄闂?ZooKeeper 鍩烘湰鍘熺悊锛?/h1>

鏄ㄥぉ瓒呯骇閲嶆敞鏀剁背 缂栫▼瀛︿範鎯呭喌

'618骞翠腑澶т績|瓒呯骇鐪侀挶鏀荤暐'.html(false)

redis鏋舵瀯

鑲℃潈鏋舵瀯璁捐鐨勭洰鐨勫拰鍘熷垯