{"id":44,"date":"2024-03-19T16:34:56","date_gmt":"2024-03-19T08:34:56","guid":{"rendered":"http:\/\/www.syu1.cn\/?p=44"},"modified":"2024-03-19T16:44:44","modified_gmt":"2024-03-19T08:44:44","slug":"kali-2024-%e5%ae%89%e8%a3%85docker","status":"publish","type":"post","link":"http:\/\/www.syu1.cn\/?p=44","title":{"rendered":"kali 2024 \u5b89\u88c5docker"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">0x00 Docker\u7684\u5b89\u88c5<\/h2>\n\n\n\n<p>1\u3001Linux\u5185\u6838\u7248\u672c\u67e5\u770b<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#\u5b89\u88c5docker\u8981\u6c42\u5185\u6838\u7248\u672ckerner&gt;=3.10\n#\u4e3a\u6b64\uff0c\u5148\u68c0\u67e5\u5f53\u524dLinux\u7cfb\u7edf\u7684\u5185\u6838\u7248\u672c\nuname -a\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.syu1.cn\/wp-content\/uploads\/2024\/03\/640.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"70\" data-original=\"http:\/\/www.syu1.cn\/wp-content\/uploads\/2024\/03\/640.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-45\"  sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/div><\/figure>\n\n\n\n<p>2\u3001\u66f4\u65b0apt\u6e90\u6ee1\u8db3\u4e0b\u8f7d\u8981\u6c42<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#\u65b0\u91cd\u5199sources.list\u4e2d\u5185\u5bb9\uff0c\u4e00\u4e2a\u4e2a\u5b57\u6bcd\u5220\u9664\u592a\u4e45\u4e86\necho &gt; \/etc\/apt\/sources.list\n#\u8fdb\u5165sources.list\u91cd\u65b0\u7f16\u8f91apt\u6e90\nvim \/etc\/apt\/sources.list\n#\u76f4\u63a5CV\u5927\u6cd5\u5199\u5165\u4e0b\u9762\u7684apt\u6e90\n<\/pre><\/div>\n\n\n<p>3\u3001\u8fdb\u884c\u7cfb\u7edf\u6216\u5de5\u5177\u7684\u66f4\u65b0<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#\u5176\u4ed6apt\u6e90\n#\u6b64\u5904\uff0c\u7b14\u8005\u4ec5\u6dfb\u52a0\u4e2d\u79d1\u8fbe\u548c\u963f\u91cc\u7684\uff0c\u5176\u4ed6\u6ce8\u91ca\u6389\n#\u4e2d\u79d1\u5927\ndeb http:\/\/mirrors.ustc.edu.cn\/kali kali-rolling main non-free contrib\ndeb-src http:\/\/mirrors.ustc.edu.cn\/kali kali-rolling main non-free contrib\n#\u963f\u91cc\u4e91\ndeb http:\/\/mirrors.aliyun.com\/kali kali-rolling main non-free contrib\ndeb-src http:\/\/mirrors.aliyun.com\/kali kali-rolling main non-free contrib\n#\u6e05\u534e\u5927\u5b66\n#deb http:\/\/mirrors.tuna.tsinghua.edu.cn\/kali kali-rolling main contrib non-free\n#deb-src https:\/\/mirrors.tuna.tsinghua.edu.cn\/kali kali-rolling main contrib non-free\n#\u6d59\u5927\n#deb http:\/\/mirrors.zju.edu.cn\/kali kali-rolling main contrib non-free\n#deb-src http:\/\/mirrors.zju.edu.cn\/kali kali-rolling main contrib non-free\n#\u4e1c\u8f6f\u5927\u5b66\n#deb http:\/\/mirrors.neusoft.edu.cn\/kali kali-rolling\/main non-free contribp.kali.org\/kali kali-rolling main non-free contrib\n#\u91cd\u5e86\u5927\u5b66\n#deb http:\/\/http.kali.org\/kali kali-rolling main non-free contrib\n#deb-src http:\/\/http.kali.org\/kali kali-rolling main non-free contrib\n<\/pre><\/div>\n\n\n<p>4\u3001\u91c7\u7528apt\u5b89\u88c5Docker<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#\u8fdb\u884c\u7cfb\u7edf\u6216\u5de5\u5177\u7684\u66f4\u65b0\uff08\u6709\u4e22\u4e22\u5c31\uff0c\u5148\u4e0a\u628a\u738b\u8005\uff09\n#\u6ce8\uff1a\u5f53\u51fa\u73b0\u6b63\u5728\u8bbe\u5b9a\u8f6f\u4ef6\u5305\u754c\u9762\u65f6\uff0c\u76f4\u63a5\u6309tab+enter\u8fdb\u884c\u786e\u8ba4\nsudo apt-get update \nsudo apt-get upgrade\nsudo apt-get dist-upgrade  #\u5747\u9009\u62e9yes\n#\u793c\u8c8c\u6027\u6e05\u9664\u66f4\u65b0\u7f13\u5b58\nsudo apt-get clean\n\nsudo apt-get install docker.io\nsudo apt-get install docker-compose  #\u5747\u9009\u62e9yes\n<\/pre><\/div>\n\n\n<p>5\u3001\u68c0\u9a8cDocker\u6210\u529f\u5b89\u88c5<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo docker -v\nsudo docker-compose -v\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">0x01 Docker\u7684\u5176\u4ed6\u914d\u7f6e<\/h2>\n\n\n\n<p>\u914d\u7f6e\u955c\u50cf\u52a0\u901f<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntee \/etc\/docker\/daemon.json &lt;&lt;-&#039;EOF&#039;{\n&quot;registry-mirrors&quot;: &#x5B;\n&quot;https:\/\/docker.m.daocloud.io&quot;,\n&quot;https:\/\/dockerproxy.com&quot;,\n&quot;https:\/\/docker.mirrors.sjtug.sjtu.edu.cn&quot;,\n&quot;https:\/\/docker.nju.edu.cn&quot;\n] } EOF\n<\/pre><\/div>\n\n\n<p>\u5c06\u914d\u7f6e\u6587\u4ef6\u52a0\u8f7d\u5230daemon\u4e2d\uff0c\u5e76\u6267\u884c\u91cd\u542f\u547d\u4ee4\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl daemon-reload\nsudo systemctl restart docker\n<\/pre><\/div>\n\n\n<p>\u786e\u8ba4\u914d\u7f6e\u7684\u955c\u50cf\u5730\u5740\u662f\u5426\u751f\u6548<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndocker info\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>0x00 Docker\u7684\u5b89\u88c5 1\u3001Linux\u5185\u6838\u7248\u672c\u67e5\u770b 2\u3001\u66f4\u65b0apt\u6e90\u6ee1\u8db3\u4e0b\u8f7d\u8981\u6c42 3\u3001\u8fdb\u884c\u7cfb\u7edf\u6216\u5de5\u5177\u7684\u66f4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,8],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-docker","category-zhishi"],"_links":{"self":[{"href":"http:\/\/www.syu1.cn\/index.php?rest_route=\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.syu1.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.syu1.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.syu1.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.syu1.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=44"}],"version-history":[{"count":1,"href":"http:\/\/www.syu1.cn\/index.php?rest_route=\/wp\/v2\/posts\/44\/revisions"}],"predecessor-version":[{"id":46,"href":"http:\/\/www.syu1.cn\/index.php?rest_route=\/wp\/v2\/posts\/44\/revisions\/46"}],"wp:attachment":[{"href":"http:\/\/www.syu1.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.syu1.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.syu1.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}