{"id":57610,"date":"2025-08-15T16:10:31","date_gmt":"2025-08-15T08:10:31","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/57610.html"},"modified":"2025-08-15T16:10:31","modified_gmt":"2025-08-15T08:10:31","slug":"docker-login-logout-%e5%91%bd%e4%bb%a4%ef%bc%9a%e5%ae%89%e5%85%a8%e8%ae%a4%e8%af%81%e4%b8%8e%e9%95%9c%e5%83%8f%e4%bb%93%e5%ba%93%e7%ae%a1%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/57610.html","title":{"rendered":"Docker login\/logout \u547d\u4ee4\uff1a\u5b89\u5168\u8ba4\u8bc1\u4e0e\u955c\u50cf\u4ed3\u5e93\u7ba1\u7406"},"content":{"rendered":"<\/p>\n<h4>Docker login\/logout \u547d\u4ee4&#xff1a;\u5b89\u5168\u8ba4\u8bc1\u4e0e\u955c\u50cf\u4ed3\u5e93\u7ba1\u7406<\/h4>\n<ul>\n<li>\n<ul>\n<li>1. \u547d\u4ee4\u6982\u8ff0<\/li>\n<li>2. \u8ba4\u8bc1\u6d41\u7a0b\u67b6\u6784<\/li>\n<li>3. docker login \u8be6\u89e3<\/li>\n<li>\n<ul>\n<li>3.1 \u547d\u4ee4\u8bed\u6cd5<\/li>\n<li>3.2 \u53c2\u6570\u89e3\u6790<\/li>\n<li>3.3 \u8ba4\u8bc1\u6d41\u7a0b\u56fe<\/li>\n<\/ul>\n<\/li>\n<li>4. docker logout \u8be6\u89e3<\/li>\n<li>\n<ul>\n<li>4.1 \u547d\u4ee4\u8bed\u6cd5<\/li>\n<li>4.2 \u6570\u636e\u6e05\u9664\u8fc7\u7a0b<\/li>\n<\/ul>\n<\/li>\n<li>5. \u5b89\u5168\u5b9e\u8df5\u6307\u5357<\/li>\n<li>\n<ul>\n<li>5.1 \u8ba4\u8bc1\u65b9\u5f0f\u5bf9\u6bd4<\/li>\n<li>5.2 \u6700\u4f73\u5b89\u5168\u5b9e\u8df5<\/li>\n<\/ul>\n<\/li>\n<li>6. \u5b9e\u6218\u573a\u666f\u793a\u4f8b<\/li>\n<li>\n<ul>\n<li>6.1 \u4f01\u4e1a\u7ea7\u79c1\u6709\u4ed3\u5e93\u8ba4\u8bc1<\/li>\n<li>6.2 CI\/CD \u6d41\u6c34\u7ebf\u96c6\u6210<\/li>\n<li>6.3 \u591a\u4ed3\u5e93\u914d\u7f6e\u7ba1\u7406<\/li>\n<\/ul>\n<\/li>\n<li>7. \u914d\u7f6e\u6587\u4ef6\u6df1\u5ea6\u89e3\u6790<\/li>\n<li>8. \u5e38\u89c1\u95ee\u9898\u6392\u67e5<\/li>\n<li>\n<ul>\n<li>8.1 \u8ba4\u8bc1\u5931\u8d25\u5206\u6790<\/li>\n<li>8.2 \u5178\u578b\u9519\u8bef\u5904\u7406<\/li>\n<\/ul>\n<\/li>\n<li>9. \u9ad8\u7ea7\u4e3b\u9898<\/li>\n<li>\n<ul>\n<li>9.1 \u51ed\u8bc1\u5b58\u50a8\u65b9\u6848<\/li>\n<li>9.2 \u4f01\u4e1a\u7ea7SSO\u96c6\u6210<\/li>\n<\/ul>\n<\/li>\n<li>10. \u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5<\/li>\n<li>\n<ul>\n<li>10.1 \u6838\u5fc3\u8981\u70b9<\/li>\n<li>10.2 \u63a8\u8350\u5de5\u4f5c\u6d41<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"50%\">\n<p>     <font face=\"STCAIYUN\" color=\"red\" size=\"4\">&#x1f33a;The Begin&#x1f33a;\u70b9\u70b9\u5173\u6ce8&#xff0c;\u6536\u85cf\u4e0d\u8ff7\u8def&#x1f33a;<\/font>\n     <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>1. \u547d\u4ee4\u6982\u8ff0<\/h3>\n<p>docker login \u548c docker logout \u662f Docker \u8ba4\u8bc1\u4f53\u7cfb\u7684\u6838\u5fc3\u547d\u4ee4&#xff0c;\u7528\u4e8e\u7ba1\u7406 Docker \u5ba2\u6237\u7aef\u4e0e\u955c\u50cf\u4ed3\u5e93\u7684\u5b89\u5168\u8fde\u63a5\u3002\u8fd9\u4e9b\u547d\u4ee4\u4e0d\u4ec5\u652f\u6301 Docker Hub&#xff0c;\u8fd8\u9002\u7528\u4e8e\u5404\u7c7b\u79c1\u6709\u4ed3\u5e93&#xff08;\u5982 Harbor\u3001Nexus \u7b49&#xff09;\u3002<\/p>\n<h3>2. \u8ba4\u8bc1\u6d41\u7a0b\u67b6\u6784<\/h3>\n<p>  #mermaid-svg-7nJ79bMpQuPaLURI {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-7nJ79bMpQuPaLURI .error-icon{fill:#552222;}#mermaid-svg-7nJ79bMpQuPaLURI .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-7nJ79bMpQuPaLURI .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-7nJ79bMpQuPaLURI .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-7nJ79bMpQuPaLURI .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-7nJ79bMpQuPaLURI .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-7nJ79bMpQuPaLURI .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-7nJ79bMpQuPaLURI .marker{fill:#333333;stroke:#333333;}#mermaid-svg-7nJ79bMpQuPaLURI .marker.cross{stroke:#333333;}#mermaid-svg-7nJ79bMpQuPaLURI svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-7nJ79bMpQuPaLURI .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-7nJ79bMpQuPaLURI .cluster-label text{fill:#333;}#mermaid-svg-7nJ79bMpQuPaLURI .cluster-label span{color:#333;}#mermaid-svg-7nJ79bMpQuPaLURI .label text,#mermaid-svg-7nJ79bMpQuPaLURI span{fill:#333;color:#333;}#mermaid-svg-7nJ79bMpQuPaLURI .node rect,#mermaid-svg-7nJ79bMpQuPaLURI .node circle,#mermaid-svg-7nJ79bMpQuPaLURI .node ellipse,#mermaid-svg-7nJ79bMpQuPaLURI .node polygon,#mermaid-svg-7nJ79bMpQuPaLURI .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-7nJ79bMpQuPaLURI .node .label{text-align:center;}#mermaid-svg-7nJ79bMpQuPaLURI .node.clickable{cursor:pointer;}#mermaid-svg-7nJ79bMpQuPaLURI .arrowheadPath{fill:#333333;}#mermaid-svg-7nJ79bMpQuPaLURI .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-7nJ79bMpQuPaLURI .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-7nJ79bMpQuPaLURI .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-7nJ79bMpQuPaLURI .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-7nJ79bMpQuPaLURI .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-7nJ79bMpQuPaLURI .cluster text{fill:#333;}#mermaid-svg-7nJ79bMpQuPaLURI .cluster span{color:#333;}#mermaid-svg-7nJ79bMpQuPaLURI div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-7nJ79bMpQuPaLURI :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>          \u5b89\u5168\u5c42<\/p>\n<p>         <span id=\"L-L-Client-Auth\" class=\"edgeLabel L-LS-Client&#039; L-LE-Auth\">1. \u8ba4\u8bc1\u8bf7\u6c42<\/span><\/p>\n<p>         <span id=\"L-L-Auth-Client\" class=\"edgeLabel L-LS-Auth&#039; L-LE-Client\">2. \u4ee4\u724c\u8fd4\u56de<\/span><\/p>\n<p>         <span id=\"L-L-Client-Registry\" class=\"edgeLabel L-LS-Client&#039; L-LE-Registry\">3. \u5e26\u6743\u8bbf\u95ee<\/span><\/p>\n<p>         <span id=\"L-L-Creds-Config\" class=\"edgeLabel L-LS-Creds&#039; L-LE-Config\">\u52a0\u5bc6<\/span><\/p>\n<p>          \/.docker\/config.json<\/p>\n<p>          \u51ed\u636e\u5b58\u50a8<\/p>\n<p>          Docker\u5ba2\u6237\u7aef<\/p>\n<p>          \u8ba4\u8bc1\u670d\u52a1<\/p>\n<p>          \u955c\u50cf\u4ed3\u5e93<\/p>\n<h3>3. docker login \u8be6\u89e3<\/h3>\n<h4>3.1 \u547d\u4ee4\u8bed\u6cd5<\/h4>\n<p>docker login <span class=\"token punctuation\">[<\/span>OPTIONS<span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">[<\/span>SERVER<span class=\"token punctuation\">]<\/span><\/p>\n<h4>3.2 \u53c2\u6570\u89e3\u6790<\/h4>\n<table>\n<tr>\u53c2\u6570\u8bf4\u660e\u5b89\u5168\u7b49\u7ea7\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>-u, &#8211;username<\/td>\n<td>\u6307\u5b9a\u7528\u6237\u540d<\/td>\n<td>\u2605\u2605\u2605<\/td>\n<td>-u dev_user<\/td>\n<\/tr>\n<tr>\n<td>-p, &#8211;password<\/td>\n<td>\u76f4\u63a5\u8f93\u5165\u5bc6\u7801&#xff08;\u4e0d\u63a8\u8350&#xff09;<\/td>\n<td>\u2605<\/td>\n<td>-p 123456<\/td>\n<\/tr>\n<tr>\n<td>&#8211;password-stdin<\/td>\n<td>\u4ece\u6807\u51c6\u8f93\u5165\u8bfb\u53d6\u5bc6\u7801<\/td>\n<td>\u2605\u2605\u2605\u2605<\/td>\n<td>echo &#034;pwd&#034; | docker login -u user &#8211;password-stdin<\/td>\n<\/tr>\n<tr>\n<td>SERVER<\/td>\n<td>\u4ed3\u5e93\u5730\u5740<\/td>\n<td>&#8211;<\/td>\n<td>registry.example.com<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>3.3 \u8ba4\u8bc1\u6d41\u7a0b\u56fe<\/h4>\n<p>  #mermaid-svg-S9b4OLIWrKvibHe4 {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-S9b4OLIWrKvibHe4 .error-icon{fill:#552222;}#mermaid-svg-S9b4OLIWrKvibHe4 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-S9b4OLIWrKvibHe4 .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-S9b4OLIWrKvibHe4 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-S9b4OLIWrKvibHe4 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-S9b4OLIWrKvibHe4 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-S9b4OLIWrKvibHe4 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-S9b4OLIWrKvibHe4 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-S9b4OLIWrKvibHe4 .marker.cross{stroke:#333333;}#mermaid-svg-S9b4OLIWrKvibHe4 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-S9b4OLIWrKvibHe4 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-S9b4OLIWrKvibHe4 text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-svg-S9b4OLIWrKvibHe4 .actor-line{stroke:grey;}#mermaid-svg-S9b4OLIWrKvibHe4 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-S9b4OLIWrKvibHe4 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-S9b4OLIWrKvibHe4 #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-S9b4OLIWrKvibHe4 .sequenceNumber{fill:white;}#mermaid-svg-S9b4OLIWrKvibHe4 #sequencenumber{fill:#333;}#mermaid-svg-S9b4OLIWrKvibHe4 #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-S9b4OLIWrKvibHe4 .messageText{fill:#333;stroke:#333;}#mermaid-svg-S9b4OLIWrKvibHe4 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-S9b4OLIWrKvibHe4 .labelText,#mermaid-svg-S9b4OLIWrKvibHe4 .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-S9b4OLIWrKvibHe4 .loopText,#mermaid-svg-S9b4OLIWrKvibHe4 .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-S9b4OLIWrKvibHe4 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-S9b4OLIWrKvibHe4 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-S9b4OLIWrKvibHe4 .noteText,#mermaid-svg-S9b4OLIWrKvibHe4 .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-S9b4OLIWrKvibHe4 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-S9b4OLIWrKvibHe4 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-S9b4OLIWrKvibHe4 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-S9b4OLIWrKvibHe4 .actorPopupMenu{position:absolute;}#mermaid-svg-S9b4OLIWrKvibHe4 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 \/ 0.4));}#mermaid-svg-S9b4OLIWrKvibHe4 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-S9b4OLIWrKvibHe4 .actor-man circle,#mermaid-svg-S9b4OLIWrKvibHe4 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-S9b4OLIWrKvibHe4 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>      User<\/p>\n<p>      Docker_Client<\/p>\n<p>      Auth_Service<\/p>\n<p>      Registry<\/p>\n<p>   docker login -u user<\/p>\n<p>   \u53d1\u9001\u51ed\u636e<\/p>\n<p>   \u8fd4\u56de\u8ba4\u8bc1\u4ee4\u724c<\/p>\n<p>   \u5e26\u4ee4\u724c\u8bf7\u6c42<\/p>\n<p>   \u8fd4\u56de\u64cd\u4f5c\u6743\u9650<\/p>\n<p>   Login Succeeded<\/p>\n<p>     User<\/p>\n<p>     Docker_Client<\/p>\n<p>     Auth_Service<\/p>\n<p>     Registry<\/p>\n<h3>4. docker logout \u8be6\u89e3<\/h3>\n<h4>4.1 \u547d\u4ee4\u8bed\u6cd5<\/h4>\n<p>docker <span class=\"token builtin class-name\">logout<\/span> <span class=\"token punctuation\">[<\/span>SERVER<span class=\"token punctuation\">]<\/span><\/p>\n<h4>4.2 \u6570\u636e\u6e05\u9664\u8fc7\u7a0b<\/h4>\n<p>  #mermaid-svg-caT3qFIFPKtuc0Rx {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-caT3qFIFPKtuc0Rx .error-icon{fill:#552222;}#mermaid-svg-caT3qFIFPKtuc0Rx .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-caT3qFIFPKtuc0Rx .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-caT3qFIFPKtuc0Rx .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-caT3qFIFPKtuc0Rx .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-caT3qFIFPKtuc0Rx .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-caT3qFIFPKtuc0Rx .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-caT3qFIFPKtuc0Rx .marker{fill:#333333;stroke:#333333;}#mermaid-svg-caT3qFIFPKtuc0Rx .marker.cross{stroke:#333333;}#mermaid-svg-caT3qFIFPKtuc0Rx svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-caT3qFIFPKtuc0Rx .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-caT3qFIFPKtuc0Rx .cluster-label text{fill:#333;}#mermaid-svg-caT3qFIFPKtuc0Rx .cluster-label span{color:#333;}#mermaid-svg-caT3qFIFPKtuc0Rx .label text,#mermaid-svg-caT3qFIFPKtuc0Rx span{fill:#333;color:#333;}#mermaid-svg-caT3qFIFPKtuc0Rx .node rect,#mermaid-svg-caT3qFIFPKtuc0Rx .node circle,#mermaid-svg-caT3qFIFPKtuc0Rx .node ellipse,#mermaid-svg-caT3qFIFPKtuc0Rx .node polygon,#mermaid-svg-caT3qFIFPKtuc0Rx .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-caT3qFIFPKtuc0Rx .node .label{text-align:center;}#mermaid-svg-caT3qFIFPKtuc0Rx .node.clickable{cursor:pointer;}#mermaid-svg-caT3qFIFPKtuc0Rx .arrowheadPath{fill:#333333;}#mermaid-svg-caT3qFIFPKtuc0Rx .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-caT3qFIFPKtuc0Rx .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-caT3qFIFPKtuc0Rx .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-caT3qFIFPKtuc0Rx .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-caT3qFIFPKtuc0Rx .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-caT3qFIFPKtuc0Rx .cluster text{fill:#333;}#mermaid-svg-caT3qFIFPKtuc0Rx .cluster span{color:#333;}#mermaid-svg-caT3qFIFPKtuc0Rx div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-caT3qFIFPKtuc0Rx :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span id=\"L-L-Logout-Config\" class=\"edgeLabel L-LS-Logout&#039; L-LE-Config\"><\/span><\/p>\n<p>         <span id=\"L-L-Config-Remove\" class=\"edgeLabel L-LS-Config&#039; L-LE-Remove\"><\/span><\/p>\n<p>         <span id=\"L-L-Remove-Confirm\" class=\"edgeLabel L-LS-Remove&#039; L-LE-Confirm\"><\/span><\/p>\n<p>          \u6267\u884clogout<\/p>\n<p>          \u4fee\u6539config.json<\/p>\n<p>          \u79fb\u9664\u5bf9\u5e94server\u914d\u7f6e<\/p>\n<p>          \u8f93\u51fa\u79fb\u9664\u786e\u8ba4<\/p>\n<h3>5. \u5b89\u5168\u5b9e\u8df5\u6307\u5357<\/h3>\n<h4>5.1 \u8ba4\u8bc1\u65b9\u5f0f\u5bf9\u6bd4<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815081027-689eeb73db1ab.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>5.2 \u6700\u4f73\u5b89\u5168\u5b9e\u8df5<\/h4>\n<li>\u6c38\u8fdc\u907f\u514d\u5728\u547d\u4ee4\u884c\u76f4\u63a5\u4f7f\u7528 -p \u53c2\u6570<\/li>\n<li>\u63a8\u8350\u4f7f\u7528 &#8211;password-stdin&#xff1a;<span class=\"token function\">cat<\/span> password.txt <span class=\"token operator\">|<\/span> docker login -u user &#8211;password-stdin\n <\/li>\n<li>\u5bf9\u4e8eCI\/CD\u73af\u5883&#xff0c;\u4f7f\u7528\u8bbf\u95ee\u4ee4\u724c&#xff1a;<span class=\"token builtin class-name\">echo<\/span> <span class=\"token variable\">$DOCKER_TOKEN<\/span> <span class=\"token operator\">|<\/span> docker login -u gitlab-ci &#8211;password-stdin\n <\/li>\n<h3>6. \u5b9e\u6218\u573a\u666f\u793a\u4f8b<\/h3>\n<h4>6.1 \u4f01\u4e1a\u7ea7\u79c1\u6709\u4ed3\u5e93\u8ba4\u8bc1<\/h4>\n<p><span class=\"token comment\"># \u767b\u5f55\u4f01\u4e1a\u4ed3\u5e93<\/span><br \/>\ndocker login registry.company.com -u employee_id<\/p>\n<p><span class=\"token comment\"># \u63a8\u9001\u955c\u50cf<\/span><br \/>\ndocker push registry.company.com\/project\/image:latest<\/p>\n<p><span class=\"token comment\"># \u9000\u51fa\u767b\u5f55<\/span><br \/>\ndocker <span class=\"token builtin class-name\">logout<\/span> registry.company.com<\/p>\n<h4>6.2 CI\/CD \u6d41\u6c34\u7ebf\u96c6\u6210<\/h4>\n<p><span class=\"token shebang important\">#!\/bin\/bash<\/span><br \/>\n<span class=\"token comment\"># \u5b89\u5168\u767b\u5f55\u793a\u4f8b<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token variable\">$CI_DEPLOY_PASSWORD<\/span> <span class=\"token operator\">|<\/span> docker login -u <span class=\"token variable\">$CI_DEPLOY_USER<\/span> &#8211;password-stdin registry.gitlab.com<\/p>\n<p><span class=\"token comment\"># \u6784\u5efa\u5e76\u63a8\u9001<\/span><br \/>\ndocker build -t registry.gitlab.com\/group\/project:<span class=\"token variable\">$CI_COMMIT_SHA<\/span> <span class=\"token builtin class-name\">.<\/span><br \/>\ndocker push registry.gitlab.com\/group\/project:<span class=\"token variable\">$CI_COMMIT_SHA<\/span><\/p>\n<p><span class=\"token comment\"># \u6e05\u7406\u51ed\u8bc1<\/span><br \/>\ndocker <span class=\"token builtin class-name\">logout<\/span> registry.gitlab.com<\/p>\n<h4>6.3 \u591a\u4ed3\u5e93\u914d\u7f6e\u7ba1\u7406<\/h4>\n<p><span class=\"token comment\"># \u540c\u65f6\u7ba1\u7406\u591a\u4e2a\u4ed3\u5e93<\/span><br \/>\ndocker login registry1.com -u user1<br \/>\ndocker login registry2.com -u user2<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">cat<\/span> ~\/.docker\/config.json<\/p>\n<h3>7. \u914d\u7f6e\u6587\u4ef6\u6df1\u5ea6\u89e3\u6790<\/h3>\n<p>~\/.docker\/config.json \u793a\u4f8b&#xff1a;<\/p>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string\">&#034;auths&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token string\">&#034;https:\/\/index.docker.io\/v1\/&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token string\">&#034;auth&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;base64\u7f16\u7801\u7684user:pwd&#034;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#034;registry.example.com&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token string\">&#034;auth&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;another_base64_string&#034;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string\">&#034;credsStore&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;osxkeychain&#034;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h3>8. \u5e38\u89c1\u95ee\u9898\u6392\u67e5<\/h3>\n<h4>8.1 \u8ba4\u8bc1\u5931\u8d25\u5206\u6790<\/h4>\n<p>  #mermaid-svg-sI01pguIOWyfBRR0 {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-sI01pguIOWyfBRR0 .error-icon{fill:#552222;}#mermaid-svg-sI01pguIOWyfBRR0 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-sI01pguIOWyfBRR0 .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-sI01pguIOWyfBRR0 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-sI01pguIOWyfBRR0 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-sI01pguIOWyfBRR0 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-sI01pguIOWyfBRR0 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-sI01pguIOWyfBRR0 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-sI01pguIOWyfBRR0 .marker.cross{stroke:#333333;}#mermaid-svg-sI01pguIOWyfBRR0 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-sI01pguIOWyfBRR0 .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-sI01pguIOWyfBRR0 .cluster-label text{fill:#333;}#mermaid-svg-sI01pguIOWyfBRR0 .cluster-label span{color:#333;}#mermaid-svg-sI01pguIOWyfBRR0 .label text,#mermaid-svg-sI01pguIOWyfBRR0 span{fill:#333;color:#333;}#mermaid-svg-sI01pguIOWyfBRR0 .node rect,#mermaid-svg-sI01pguIOWyfBRR0 .node circle,#mermaid-svg-sI01pguIOWyfBRR0 .node ellipse,#mermaid-svg-sI01pguIOWyfBRR0 .node polygon,#mermaid-svg-sI01pguIOWyfBRR0 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-sI01pguIOWyfBRR0 .node .label{text-align:center;}#mermaid-svg-sI01pguIOWyfBRR0 .node.clickable{cursor:pointer;}#mermaid-svg-sI01pguIOWyfBRR0 .arrowheadPath{fill:#333333;}#mermaid-svg-sI01pguIOWyfBRR0 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-sI01pguIOWyfBRR0 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-sI01pguIOWyfBRR0 .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-sI01pguIOWyfBRR0 .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-sI01pguIOWyfBRR0 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-sI01pguIOWyfBRR0 .cluster text{fill:#333;}#mermaid-svg-sI01pguIOWyfBRR0 .cluster span{color:#333;}#mermaid-svg-sI01pguIOWyfBRR0 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-sI01pguIOWyfBRR0 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span id=\"L-L-A-B\" class=\"edgeLabel L-LS-A&#039; L-LE-B\"><\/span><\/p>\n<p>         <span id=\"L-L-B-C\" class=\"edgeLabel L-LS-B&#039; L-LE-C\"><\/span><\/p>\n<p>         <span id=\"L-L-C-D\" class=\"edgeLabel L-LS-C&#039; L-LE-D\"><\/span><\/p>\n<p>         <span id=\"L-L-D-E\" class=\"edgeLabel L-LS-D&#039; L-LE-E\"><\/span><\/p>\n<p>         <span id=\"L-L-E-F\" class=\"edgeLabel L-LS-E&#039; L-LE-F\"><\/span><\/p>\n<p>          \u767b\u5f55\u5931\u8d25<\/p>\n<p>          \u68c0\u67e5\u7f51\u7edc<\/p>\n<p>          \u9a8c\u8bc1\u51ed\u636e<\/p>\n<p>          \u68c0\u67e5\u4ed3\u5e93URL<\/p>\n<p>          \u67e5\u770bdocker info<\/p>\n<p>          \u68c0\u67e5TLS\u8bc1\u4e66<\/p>\n<h4>8.2 \u5178\u578b\u9519\u8bef\u5904\u7406<\/h4>\n<table>\n<tr>\u9519\u8bef\u539f\u56e0\u89e3\u51b3\u65b9\u6848<\/tr>\n<tbody>\n<tr>\n<td>Error: No such host<\/td>\n<td>\u4ed3\u5e93\u5730\u5740\u9519\u8bef<\/td>\n<td>\u786e\u8ba4\u4ed3\u5e93\u57df\u540d\u89e3\u6790<\/td>\n<\/tr>\n<tr>\n<td>Error: Invalid credentials<\/td>\n<td>\u51ed\u636e\u9519\u8bef<\/td>\n<td>\u91cd\u7f6e\u5bc6\u7801\/\u68c0\u67e5\u7528\u6237\u540d<\/td>\n<\/tr>\n<tr>\n<td>Error: TLS handshake timeout<\/td>\n<td>\u8bc1\u4e66\u95ee\u9898<\/td>\n<td>\u66f4\u65b0CA\u8bc1\u4e66<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>9. \u9ad8\u7ea7\u4e3b\u9898<\/h3>\n<h4>9.1 \u51ed\u8bc1\u5b58\u50a8\u65b9\u6848<\/h4>\n<p>  #mermaid-svg-eqzqmeSqznBnee3K {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-eqzqmeSqznBnee3K .error-icon{fill:#552222;}#mermaid-svg-eqzqmeSqznBnee3K .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-eqzqmeSqznBnee3K .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-eqzqmeSqznBnee3K .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-eqzqmeSqznBnee3K .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-eqzqmeSqznBnee3K .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-eqzqmeSqznBnee3K .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-eqzqmeSqznBnee3K .marker{fill:#333333;stroke:#333333;}#mermaid-svg-eqzqmeSqznBnee3K .marker.cross{stroke:#333333;}#mermaid-svg-eqzqmeSqznBnee3K svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-eqzqmeSqznBnee3K .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-eqzqmeSqznBnee3K .cluster-label text{fill:#333;}#mermaid-svg-eqzqmeSqznBnee3K .cluster-label span{color:#333;}#mermaid-svg-eqzqmeSqznBnee3K .label text,#mermaid-svg-eqzqmeSqznBnee3K span{fill:#333;color:#333;}#mermaid-svg-eqzqmeSqznBnee3K .node rect,#mermaid-svg-eqzqmeSqznBnee3K .node circle,#mermaid-svg-eqzqmeSqznBnee3K .node ellipse,#mermaid-svg-eqzqmeSqznBnee3K .node polygon,#mermaid-svg-eqzqmeSqznBnee3K .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-eqzqmeSqznBnee3K .node .label{text-align:center;}#mermaid-svg-eqzqmeSqznBnee3K .node.clickable{cursor:pointer;}#mermaid-svg-eqzqmeSqznBnee3K .arrowheadPath{fill:#333333;}#mermaid-svg-eqzqmeSqznBnee3K .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-eqzqmeSqznBnee3K .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-eqzqmeSqznBnee3K .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-eqzqmeSqznBnee3K .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-eqzqmeSqznBnee3K .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-eqzqmeSqznBnee3K .cluster text{fill:#333;}#mermaid-svg-eqzqmeSqznBnee3K .cluster span{color:#333;}#mermaid-svg-eqzqmeSqznBnee3K div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-eqzqmeSqznBnee3K :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span id=\"L-L-Native-Pass\" class=\"edgeLabel L-LS-Native&#039; L-LE-Pass\"><\/span><\/p>\n<p>         <span id=\"L-L-Pass-Win\" class=\"edgeLabel L-LS-Pass&#039; L-LE-Win\"><\/span><\/p>\n<p>         <span id=\"L-L-Pass-Mac\" class=\"edgeLabel L-LS-Pass&#039; L-LE-Mac\"><\/span><\/p>\n<p>         <span id=\"L-L-Pass-Linux\" class=\"edgeLabel L-LS-Pass&#039; L-LE-Linux\"><\/span><\/p>\n<p>          \u672c\u5730\u6587\u4ef6<\/p>\n<p>          \u5bc6\u7801\u7ba1\u7406\u5668<\/p>\n<p>          WinCred<\/p>\n<p>          macOS\u94a5\u5319\u4e32<\/p>\n<p>          Secret Service<\/p>\n<p>\u542f\u7528\u51ed\u8bc1\u5b58\u50a8&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u53ef\u7528\u5e2e\u52a9\u7a0b\u5e8f<\/span><br \/>\ndocker-credential-helpers list<\/p>\n<p><span class=\"token comment\"># \u914d\u7f6e\u4f7f\u7528<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#039;{&#034;credsStore&#034;:&#034;osxkeychain&#034;}&#039;<\/span> <span class=\"token operator\">&gt;<\/span> ~\/.docker\/config.json<\/p>\n<h4>9.2 \u4f01\u4e1a\u7ea7SSO\u96c6\u6210<\/h4>\n<p><span class=\"token comment\"># \u4f7f\u7528\u4ee4\u724c\u767b\u5f55<\/span><br \/>\ndocker login -u oauth2accesstoken -p <span class=\"token variable\"><span class=\"token variable\">$(<\/span>gcloud auth print-access-token<span class=\"token variable\">)<\/span><\/span> https:\/\/gcr.io<\/p>\n<h3>10. \u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h3>\n<h4>10.1 \u6838\u5fc3\u8981\u70b9<\/h4>\n<li>\u5b89\u5168\u7b2c\u4e00&#xff1a;\u59cb\u7ec8\u4f7f\u7528\u6700\u5b89\u5168\u7684\u8ba4\u8bc1\u65b9\u5f0f<\/li>\n<li>\u6700\u5c0f\u6743\u9650&#xff1a;\u4e3a\u4e0d\u540c\u573a\u666f\u521b\u5efa\u4e13\u7528\u8d26\u6237<\/li>\n<li>\u53ca\u65f6\u6e05\u7406&#xff1a;\u4e0d\u5728\u5171\u4eab\u73af\u5883\u4fdd\u7559\u767b\u5f55\u72b6\u6001<\/li>\n<li>\u5ba1\u8ba1\u8ddf\u8e2a&#xff1a;\u8bb0\u5f55\u5173\u952e\u64cd\u4f5c\u65e5\u5fd7<\/li>\n<h4>10.2 \u63a8\u8350\u5de5\u4f5c\u6d41<\/h4>\n<p>  #mermaid-svg-URuFLhc9E0TcU5UZ {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-URuFLhc9E0TcU5UZ .error-icon{fill:#552222;}#mermaid-svg-URuFLhc9E0TcU5UZ .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-URuFLhc9E0TcU5UZ .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-URuFLhc9E0TcU5UZ .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-URuFLhc9E0TcU5UZ .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-URuFLhc9E0TcU5UZ .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-URuFLhc9E0TcU5UZ .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-URuFLhc9E0TcU5UZ .marker{fill:#333333;stroke:#333333;}#mermaid-svg-URuFLhc9E0TcU5UZ .marker.cross{stroke:#333333;}#mermaid-svg-URuFLhc9E0TcU5UZ svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-URuFLhc9E0TcU5UZ .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-URuFLhc9E0TcU5UZ .cluster-label text{fill:#333;}#mermaid-svg-URuFLhc9E0TcU5UZ .cluster-label span{color:#333;}#mermaid-svg-URuFLhc9E0TcU5UZ .label text,#mermaid-svg-URuFLhc9E0TcU5UZ span{fill:#333;color:#333;}#mermaid-svg-URuFLhc9E0TcU5UZ .node rect,#mermaid-svg-URuFLhc9E0TcU5UZ .node circle,#mermaid-svg-URuFLhc9E0TcU5UZ .node ellipse,#mermaid-svg-URuFLhc9E0TcU5UZ .node polygon,#mermaid-svg-URuFLhc9E0TcU5UZ .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-URuFLhc9E0TcU5UZ .node .label{text-align:center;}#mermaid-svg-URuFLhc9E0TcU5UZ .node.clickable{cursor:pointer;}#mermaid-svg-URuFLhc9E0TcU5UZ .arrowheadPath{fill:#333333;}#mermaid-svg-URuFLhc9E0TcU5UZ .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-URuFLhc9E0TcU5UZ .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-URuFLhc9E0TcU5UZ .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-URuFLhc9E0TcU5UZ .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-URuFLhc9E0TcU5UZ .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-URuFLhc9E0TcU5UZ .cluster text{fill:#333;}#mermaid-svg-URuFLhc9E0TcU5UZ .cluster span{color:#333;}#mermaid-svg-URuFLhc9E0TcU5UZ div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-URuFLhc9E0TcU5UZ :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span id=\"L-L-Start-Auth\" class=\"edgeLabel L-LS-Start&#039; L-LE-Auth\"><\/span><\/p>\n<p>         <span id=\"L-L-Auth-Oper\" class=\"edgeLabel L-LS-Auth&#039; L-LE-Oper\"><\/span><\/p>\n<p>         <span id=\"L-L-Oper-Logout\" class=\"edgeLabel L-LS-Oper&#039; L-LE-Logout\"><\/span><\/p>\n<p>         <span id=\"L-L-Logout-Audit\" class=\"edgeLabel L-LS-Logout&#039; L-LE-Audit\"><\/span><\/p>\n<p>          \u5f00\u59cb<\/p>\n<p>          \u5b89\u5168\u767b\u5f55<\/p>\n<p>          \u955c\u50cf\u64cd\u4f5c<\/p>\n<p>          \u53ca\u65f6\u9000\u51fa<\/p>\n<p>          \u8bb0\u5f55\u65e5\u5fd7<\/p>\n<p>\u901a\u8fc7\u638c\u63e1 docker login\/logout \u7684\u9ad8\u7ea7\u7528\u6cd5&#xff0c;\u60a8\u53ef\u4ee5&#xff1a;<\/p>\n<ul>\n<li>\u5b89\u5168\u9ad8\u6548\u5730\u7ba1\u7406\u4f01\u4e1a\u955c\u50cf\u8d44\u4ea7<\/li>\n<li>\u5b9e\u73b0CI\/CD\u6d41\u6c34\u7ebf\u7684\u81ea\u52a8\u5316\u8ba4\u8bc1<\/li>\n<li>\u6ee1\u8db3\u5408\u89c4\u6027\u8981\u6c42\u7684\u8bbf\u95ee\u63a7\u5236<\/li>\n<li>\u6784\u5efa\u53ef\u9760\u7684\u5bb9\u5668\u5316\u5de5\u4f5c\u6d41\u7a0b<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815081029-689eeb751886b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"50%\">\n<p>     <font face=\"STCAIYUN\" color=\"red\" size=\"4\">&#x1f33a;The End&#x1f33a;\u70b9\u70b9\u5173\u6ce8&#xff0c;\u6536\u85cf\u4e0d\u8ff7\u8def&#x1f33a;<\/font>\n     <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb399\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u6587\u7ae0\u6458\u8981\uff1a Docker login\/logout\u547d\u4ee4\u662f\u7ba1\u7406Docker\u4e0e\u955c\u50cf\u4ed3\u5e93\u5b89\u5168\u8fde\u63a5\u7684\u6838\u5fc3\u5de5\u5177\u3002\u6587\u7ae0\u8be6\u7ec6\u89e3\u6790\u4e86\u4e24\u4e2a\u547d\u4ee4\u7684\u8bed\u6cd5\u53c2\u6570\u3001\u8ba4\u8bc1\u6d41\u7a0b\u548c\u5b89\u5168\u5b9e\u8df5\u3002<\/p>\n","protected":false},"author":2,"featured_media":57608,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[27,2692,61,121,6035,44],"topic":[],"class_list":["post-57610","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-docker","tag-leetcode","tag-61","tag-121","tag-6035","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Docker login\/logout \u547d\u4ee4\uff1a\u5b89\u5168\u8ba4\u8bc1\u4e0e\u955c\u50cf\u4ed3\u5e93\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/57610.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker login\/logout \u547d\u4ee4\uff1a\u5b89\u5168\u8ba4\u8bc1\u4e0e\u955c\u50cf\u4ed3\u5e93\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb399\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u6587\u7ae0\u6458\u8981\uff1a Docker login\/logout\u547d\u4ee4\u662f\u7ba1\u7406Docker\u4e0e\u955c\u50cf\u4ed3\u5e93\u5b89\u5168\u8fde\u63a5\u7684\u6838\u5fc3\u5de5\u5177\u3002\u6587\u7ae0\u8be6\u7ec6\u89e3\u6790\u4e86\u4e24\u4e2a\u547d\u4ee4\u7684\u8bed\u6cd5\u53c2\u6570\u3001\u8ba4\u8bc1\u6d41\u7a0b\u548c\u5b89\u5168\u5b9e\u8df5\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/57610.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-15T08:10:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815081027-689eeb73db1ab.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57610.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/57610.html\",\"name\":\"Docker login\/logout \u547d\u4ee4\uff1a\u5b89\u5168\u8ba4\u8bc1\u4e0e\u955c\u50cf\u4ed3\u5e93\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-15T08:10:31+00:00\",\"dateModified\":\"2025-08-15T08:10:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/57610.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/57610.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57610.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docker login\/logout \u547d\u4ee4\uff1a\u5b89\u5168\u8ba4\u8bc1\u4e0e\u955c\u50cf\u4ed3\u5e93\u7ba1\u7406\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Docker login\/logout \u547d\u4ee4\uff1a\u5b89\u5168\u8ba4\u8bc1\u4e0e\u955c\u50cf\u4ed3\u5e93\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/57610.html","og_locale":"zh_CN","og_type":"article","og_title":"Docker login\/logout \u547d\u4ee4\uff1a\u5b89\u5168\u8ba4\u8bc1\u4e0e\u955c\u50cf\u4ed3\u5e93\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb399\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u6587\u7ae0\u6458\u8981\uff1a Docker login\/logout\u547d\u4ee4\u662f\u7ba1\u7406Docker\u4e0e\u955c\u50cf\u4ed3\u5e93\u5b89\u5168\u8fde\u63a5\u7684\u6838\u5fc3\u5de5\u5177\u3002\u6587\u7ae0\u8be6\u7ec6\u89e3\u6790\u4e86\u4e24\u4e2a\u547d\u4ee4\u7684\u8bed\u6cd5\u53c2\u6570\u3001\u8ba4\u8bc1\u6d41\u7a0b\u548c\u5b89\u5168\u5b9e\u8df5\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/57610.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-15T08:10:31+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815081027-689eeb73db1ab.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"9 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/57610.html","url":"https:\/\/www.wsisp.com\/helps\/57610.html","name":"Docker login\/logout \u547d\u4ee4\uff1a\u5b89\u5168\u8ba4\u8bc1\u4e0e\u955c\u50cf\u4ed3\u5e93\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-15T08:10:31+00:00","dateModified":"2025-08-15T08:10:31+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/57610.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/57610.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/57610.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Docker login\/logout \u547d\u4ee4\uff1a\u5b89\u5168\u8ba4\u8bc1\u4e0e\u955c\u50cf\u4ed3\u5e93\u7ba1\u7406"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=57610"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57610\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/57608"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=57610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=57610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=57610"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=57610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}