{"id":54,"date":"2024-08-02T09:23:24","date_gmt":"2024-08-02T01:23:24","guid":{"rendered":"https:\/\/www.guangdanghe.net\/?p=54"},"modified":"2024-08-02T09:23:24","modified_gmt":"2024-08-02T01:23:24","slug":"%e8%a7%a3%e5%86%b3%e8%af%81%e4%b9%a6%e9%aa%8c%e8%af%81%e7%9a%84%e9%97%ae%e9%a2%98x509certificate-signed-by-unknown-authority","status":"publish","type":"post","link":"https:\/\/www.guangdanghe.net\/index.php\/2024\/08\/02\/%e8%a7%a3%e5%86%b3%e8%af%81%e4%b9%a6%e9%aa%8c%e8%af%81%e7%9a%84%e9%97%ae%e9%a2%98x509certificate-signed-by-unknown-authority\/","title":{"rendered":"\u89e3\u51b3\u8bc1\u4e66\u9a8c\u8bc1\u7684\u95ee\u9898,x509:certificate signed by unknown authority"},"content":{"rendered":"\n<p><span style=\"background-color: var(--wp--preset--color--background); color: var(--wp--preset--color--foreground); font-family: var(--wp--preset--font-family--system-font); font-size: var(--wp--preset--font-size--medium);\">\u6211\u4eec\u5728\u6784\u5efa docker \u955c\u50cf\u65f6\u4e00\u822c\u4f7f\u7528\u7684\u662f linux(centos\u6216\u8005ubuntu\u7b49\u5f85) \u7cfb\u7edf\uff0c\u9ed8\u8ba4\u662f\u4e0d\u5e26 ca-certificates \u6839\u8bc1\u4e66\u7684\uff0c\u5bfc\u81f4\u65e0\u6cd5\u8bc6\u522b\u5916\u90e8 https \u643a\u5e26\u7684\u6570\u5b57\u8bc1\u4e66\u3002<\/span><div><br><div class=\"image-package\"><div class=\"image-container\" style=\"max-width: 454px; max-height: 94px; background-color: transparent;\"><div class=\"image-container-fill\" style=\"padding-bottom: 20.7%;\"><\/div><\/div><\/div><p>\u90a3\u4e48\uff0c\u5728\u8bbf\u95ee\u7684\u65f6\u5019\u5c31\u4f1a\u629b\u51fa x509: certificate signed by unknown authority \u7684\u9519\u8bef\uff0c\u5bfc\u81f4 docker \u5bb9\u5668\u7684\u63a5\u53e3\u670d\u52a1\u8fd4\u56de 500\u3002<\/p><br><p>\u4e3a\u4e86\u89e3\u51b3\u8bc1\u4e66\u9a8c\u8bc1\u7684\u95ee\u9898\uff0c\u6211\u4eec\u8981\u5728\u6784\u5efa docker \u955c\u50cf\u7684\u65f6\u5019\u628a ca-certificates \u6839\u8bc1\u4e66\u7ed9\u88c5\u4e0a\uff0c\u8fd9\u6837\u5c31\u80fd\u8bc6\u522b\u6765\u81ea\u5916\u90e8 https \u7684\u6570\u5b57\u8bc1\u4e66\u4e86\u3002<br>\u8fd9\u91cc\u4ee5utuntu\u57fa\u7840\u955c\u50cf\u4e3a\u4f8b\uff0capt-get\u662futuntu\u7684\u4e0b\u8f7d\u547d\u4ee4<br>\u5728\u7f16\u8f91 Dockerfile \u7684\u65f6\u5019\u52a0\u5165\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\uff1a<\/p><br><div class=\"_2Uzcx_\"><button class=\"VJbwyy\" type=\"button\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><i aria-label=\"icon: copy\" class=\"anticon anticon-copy\"><svg viewbox=\"64 64 896 896\" focusable=\"false\" class=\"\" data-icon=\"copy\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z\"><\/path><\/svg><\/i><\/button><pre class=\"line-numbers  language-csharp\"><code class=\"  language-csharp\"><span class=\"token class-name\">RUN<\/span> apt<span class=\"token operator\">-<\/span><span class=\"token keyword\">get<\/span> <span class=\"token operator\">-<\/span>qq update \\<br>    <span class=\"token operator\">&amp;&amp;<\/span> apt<span class=\"token operator\">-<\/span><span class=\"token keyword\">get<\/span> <span class=\"token operator\">-<\/span>qq install <span class=\"token operator\">-<\/span>y <span class=\"token operator\">--<\/span>no<span class=\"token operator\">-<\/span>install<span class=\"token operator\">-<\/span>recommends ca<span class=\"token operator\">-<\/span>certificates curl<br><span aria-hidden=\"true\" class=\"line-numbers-rows\"><\/span><\/code><\/pre><\/div><br><p>\u5982\u679c\u4e0d\u60f3\u91cd\u65b0\u6784\u5efa\u955c\u50cf\u7684\u8bdd\uff0c\u53ef\u4ee5\u76f4\u63a5\u8fdb\u5165\u5bb9\u5668\uff1a<\/p><br><div class=\"_2Uzcx_\"><button class=\"VJbwyy\" type=\"button\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><i aria-label=\"icon: copy\" class=\"anticon anticon-copy\"><svg viewbox=\"64 64 896 896\" focusable=\"false\" class=\"\" data-icon=\"copy\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z\"><\/path><\/svg><\/i><\/button><pre class=\"line-numbers  language-bash\"><code class=\"  language-bash\">$ docker exec -it '\u5bb9\u5668ID\u6216\u5bb9\u5668\u540d\u79f0' \/bin\/bash<br><span aria-hidden=\"true\" class=\"line-numbers-rows\"><\/span><\/code><\/pre><\/div><br><p>\u7136\u540e\u6267\u884c\u5b89\u88c5\u6839\u8bc1\u4e66\u547d\u4ee4\uff1a<\/p><br><div class=\"_2Uzcx_\"><button class=\"VJbwyy\" type=\"button\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><i aria-label=\"icon: copy\" class=\"anticon anticon-copy\"><svg viewbox=\"64 64 896 896\" focusable=\"false\" class=\"\" data-icon=\"copy\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z\"><\/path><\/svg><\/i><\/button><pre class=\"line-numbers  language-csharp\"><code class=\"  language-csharp\">apt<span class=\"token operator\">-<\/span><span class=\"token keyword\">get<\/span> <span class=\"token operator\">-<\/span>qq update <br>apt<span class=\"token operator\">-<\/span><span class=\"token keyword\">get<\/span> <span class=\"token operator\">-<\/span>qq install <span class=\"token operator\">-<\/span>y <span class=\"token operator\">--<\/span>no<span class=\"token operator\">-<\/span>install<span class=\"token operator\">-<\/span>recommends ca<span class=\"token operator\">-<\/span>certificates curl<br><span aria-hidden=\"true\" class=\"line-numbers-rows\"><\/span><\/code><\/pre><\/div><br><p>\u51fa\u73b0\u4ee5\u4e0b\u8b66\u544a\uff0c\u53ef\u4ee5\u5ffd\u7565\uff1a<\/p><div class=\"_2Uzcx_\"><button class=\"VJbwyy\" type=\"button\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><i aria-label=\"icon: copy\" class=\"anticon anticon-copy\"><svg viewbox=\"64 64 896 896\" focusable=\"false\" data-icon=\"copy\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\" class=\"\"><path d=\"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z\"><\/path><\/svg><\/i><\/button><pre class=\"line-numbers  language-css\"><code class=\"  language-css\"><span class=\"token property\">WARNING<\/span><span class=\"token punctuation\">:<\/span> ca-certificates.crt does not contain exactly one certificate or <span class=\"token property\">CRL<\/span><span class=\"token punctuation\">:<\/span> skipping<br><span aria-hidden=\"true\" class=\"line-numbers-rows\"><\/span><\/code><\/pre><\/div><br><p>\u7136\u540e\u91cd\u542f\u5bb9\u5668\u5373\u53ef\uff1a<\/p><div class=\"_2Uzcx_\"><button class=\"VJbwyy\" type=\"button\" aria-label=\"\u590d\u5236\u4ee3\u7801\"><i aria-label=\"icon: copy\" class=\"anticon anticon-copy\"><svg viewbox=\"64 64 896 896\" focusable=\"false\" data-icon=\"copy\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\" class=\"\"><path d=\"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z\"><\/path><\/svg><\/i><\/button><pre class=\"line-numbers  language-ruby\"><code class=\"  language-ruby\">$ docker restart <span class=\"token string\">'\u5bb9\u5668ID\u6216\u5bb9\u5668\u540d\u79f0'<\/span><\/code><\/pre><\/div><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u5728\u6784\u5efa docker \u955c\u50cf\u65f6\u4e00\u822c\u4f7f\u7528\u7684\u662f linux(centos\u6216\u8005ubuntu\u7b49\u5f85) \u7cfb\u7edf\uff0c\u9ed8\u8ba4\u662f\u4e0d\u5e26 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.guangdanghe.net\/index.php\/wp-json\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.guangdanghe.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guangdanghe.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guangdanghe.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guangdanghe.net\/index.php\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":1,"href":"https:\/\/www.guangdanghe.net\/index.php\/wp-json\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":55,"href":"https:\/\/www.guangdanghe.net\/index.php\/wp-json\/wp\/v2\/posts\/54\/revisions\/55"}],"wp:attachment":[{"href":"https:\/\/www.guangdanghe.net\/index.php\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guangdanghe.net\/index.php\/wp-json\/wp\/v2\/categories?post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guangdanghe.net\/index.php\/wp-json\/wp\/v2\/tags?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}