{"id":236754,"date":"2020-12-31T07:41:18","date_gmt":"2020-12-30T23:41:18","guid":{"rendered":"http:\/\/4563.org\/?p=236754"},"modified":"2020-12-31T07:41:18","modified_gmt":"2020-12-30T23:41:18","slug":"docker-%e4%b8%ad%e5%90%af%e5%8a%a8-python-%e4%b8%bb%e5%87%bd%e6%95%b0%e6%97%b6%e5%a6%82%e4%bd%95%e4%bc%a0%e5%85%a5%e5%a4%96%e9%83%a8%e5%8f%82%e6%95%b0%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=236754","title":{"rendered":"docker \u4e2d\u542f\u52a8 Python \u4e3b\u51fd\u6570\u65f6\u5982\u4f55\u4f20\u5165\u5916\u90e8\u53c2\u6570\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  docker \u4e2d\u542f\u52a8 Python \u4e3b\u51fd\u6570\u65f6\u5982\u4f55\u4f20\u5165\u5916\u90e8\u53c2\u6570\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yedan1206 <\/span>  <span><i><\/i> 7<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u5728 main \u51fd\u6570\u4e2d\uff1a<br \/>from argparse import ArgumentParser<br \/>ArgumentParser().add_argument(&#8216;&#8211;name&#8217;, type=str)<\/p>\n<p>\u9700\u8981\u4f20\u5165\u53c2\u6570 name\uff0cDockerfile \u91cc\u9762 CMD \u547d\u4ee4\u5982\u4f55\u5199\uff1f      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4676022\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 676529483 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             CMD [&#8220;python&#8221;, &#8220;main.py&#8221;, &#8220;&#8211;name&#8221;, &#8220;lsp&#8221;]                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4676023\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : naomhan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4ece\u73af\u5883\u53d8\u91cf\u8bfb\u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4676024\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cclin <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             entrypoint \u5199 python main.py<br \/>\u7528\u7684\u65f6\u5019\u76f4\u63a5 docker run \u955c\u50cf\u540d &#8211;name abc                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4676025\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : bruce0 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f7f\u7528 docker \u73af\u5883\u53d8\u91cf\u5e94\u8be5\u53ef\u4ee5\u5427 \u5c31\u50cf docker mysql \u7684\u5bc6\u7801\u90a3\u6837                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4676026\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : julyclyde <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ca1\u6709 docker \u7684\u65f6\u5019\u4f60\u5c31\u4f1a\uff0c\u4e3a\u5565\u7528\u4e86 docker \u4e4b\u540e\u5c31\u4e0d\u4f1a\u4e86\u5462\uff1f\u6587\u6863\u91cc\u6ca1\u5199\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>docker \u4e2d\u542f\u52a8 Python&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/236754"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=236754"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/236754\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=236754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=236754"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=236754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}