{"id":827,"date":"2026-02-06T03:32:58","date_gmt":"2026-02-06T03:32:58","guid":{"rendered":"https:\/\/opshub.com.cn\/?p=827"},"modified":"2026-02-06T03:33:38","modified_gmt":"2026-02-06T03:33:38","slug":"docker%e6%9e%84%e5%bb%bapython3%e8%bf%90%e8%a1%8c%e7%8e%af%e5%a2%83%e5%ae%89%e8%a3%85flask%e3%80%81keybert%e3%80%81jieba-%e4%b8%89%e4%b8%aa%e4%be%9d%e8%b5%96","status":"publish","type":"post","link":"https:\/\/opshub.com.cn\/?p=827","title":{"rendered":"docker\u6784\u5efapython3\u8fd0\u884c\u73af\u5883\u5b89\u88c5flask\u3001keybert\u3001jieba \u4e09\u4e2a\u4f9d\u8d56"},"content":{"rendered":"\n<p>Dockerfile \u662f\u57fa\u4e8e<strong>Debian 12.11 (bookworm)<\/strong> \u6784\u5efa Python3 \u8fd0\u884c\u73af\u5883\uff0c\u66ff\u6362\u4e86\u5357\u5927 apt \u6e90\u3001\u5b89\u88c5\u4e86 python3\/pip\/venv\uff0c\u89e3\u51b3\u4e86 Debian \u539f\u751f\u7684 Python \u5305\u7ba1\u7406\u9650\u5236\uff0c\u8fd8\u901a\u8fc7\u534e\u4e3a\u4e91 pypi \u6e90\u5b89\u88c5\u4e86 flask\u3001keybert\u3001jieba \u4e09\u4e2a\u4f9d\u8d56<\/p>\n\n\n\n<p>Dockerfile<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FROM debian:12.11\nRUN \/bin\/rm -f \/etc\/apt\/sources.list.d\/debian.sources &amp;&amp; \\\n    echo \"deb http:\/\/mirrors.nju.edu.cn\/debian\/ bookworm main contrib non-free\" > \/etc\/apt\/sources.list &amp;&amp; \\\n    echo \"deb http:\/\/mirrors.nju.edu.cn\/debian\/ bookworm-updates main contrib non-free\" >> \/etc\/apt\/sources.list &amp;&amp; \\\n    echo \"deb http:\/\/mirrors.nju.edu.cn\/debian-security bookworm-security\/updates main contrib non-free\" >> \/etc\/apt\/sources.list &amp;&amp; \\\n    apt-get update &amp;&amp; \\\n    apt-get install -y python3 python3-pip python3-venv &amp;&amp; \\\n    \/bin\/rm -rf \/var\/lib\/apt\/lists\/* &amp;&amp; \\\n    \/bin\/mv \/usr\/lib\/python3.11\/EXTERNALLY-MANAGED \/usr\/lib\/python3.11\/EXTERNALLY-MANAGED.bak &amp;&amp; \\\n    pip install -i https:\/\/mirrors.huaweicloud.com\/repository\/pypi\/simple --no-cache-dir flask &amp;&amp; \\\n    pip install -i https:\/\/mirrors.huaweicloud.com\/repository\/pypi\/simple --no-cache-dir keybert &amp;&amp; \\\n    pip install -i https:\/\/mirrors.huaweicloud.com\/repository\/pypi\/simple --no-cache-dir jieba\n\n<\/code><\/pre>\n\n\n\n<p>\u9644\u4ef6\u4e0b\u8f7d\uff1a<\/p>\n\n\n\n<p><a href=\"https:\/\/opshub.com.cn\/wp-content\/uploads\/2026\/02\/debian_12.11.img.gz\">debian_12.11.img.gz<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dockerfile \u662f\u57fa\u4e8eDebian 12.11 (bookworm) \u6784\u5efa Python3 \u8fd0\u884c\u73af\u5883\uff0c\u66ff\u6362\u4e86\u5357\u5927 apt \u6e90\u3001\u5b89\u88c5\u4e86 python3\/pip\/venv\uff0c\u89e3\u51b3\u4e86 Debian \u539f\u751f\u7684 Python \u5305\u7ba1\u7406\u9650\u5236\uff0c\u8fd8\u901a\u8fc7\u534e\u4e3a\u4e91 pypi \u6e90\u5b89\u88c5\u4e86 flask\u3001keybert\u3001jieba \u4e09\u4e2a\u4f9d\u8d56 Dockerfile \u9644\u4ef6\u4e0b\u8f7d\uff1a debian_12.11.img.gz<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-827","post","type-post","status-publish","format-standard","hentry","category-dockerkubernetes"],"_links":{"self":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=827"}],"version-history":[{"count":1,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/827\/revisions"}],"predecessor-version":[{"id":835,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/827\/revisions\/835"}],"wp:attachment":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}