{"id":413,"date":"2022-05-16T14:11:09","date_gmt":"2022-05-16T06:11:09","guid":{"rendered":"http:\/\/usei.cn\/?p=413"},"modified":"2022-05-17T08:15:12","modified_gmt":"2022-05-17T00:15:12","slug":"docker-compose%e5%ae%89%e8%a3%85%e5%8f%8a%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/usei.cn\/index.php\/2022\/05\/16\/docker-compose%e5%ae%89%e8%a3%85%e5%8f%8a%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4\/","title":{"rendered":"docker-compose \u5b89\u88c5\u53ca\u5e38\u7528\u547d\u4ee4"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\u5b89\u88c5<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo curl -L \"https:\/\/github.com\/docker\/compose\/releases\/download\/1.27.4\/docker-compose-$(uname -s)-$(uname -m)\" -o \/usr\/local\/bin\/docker-compose<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u547d\u4ee4<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>docker-compose -h&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/td><td>&nbsp;# \u67e5\u770b\u5e2e\u52a9<\/td><\/tr><tr><td>docker-compose up &nbsp; &nbsp;<\/td><td># \u521b\u5efa\u5e76\u8fd0\u884c\u6240\u6709\u5bb9\u5668<\/td><\/tr><tr><td>docker-compose up -d<\/td><td># \u521b\u5efa\u5e76\u540e\u53f0\u8fd0\u884c\u6240\u6709\u5bb9\u5668<\/td><\/tr><tr><td>docker-compose -f docker-compose.yml up -d<\/td><td># \u6307\u5b9a\u6a21\u677f<\/td><\/tr><tr><td>docker-compose down &nbsp;<\/td><td># \u505c\u6b62\u5e76\u5220\u9664\u5bb9\u5668\u3001\u7f51\u7edc\u3001\u5377\u3001\u955c\u50cf\u3002<\/td><\/tr><tr><td>docker-compose logs<\/td><td># \u67e5\u770b\u5bb9\u5668\u8f93\u51fa\u65e5\u5fd7<\/td><\/tr><tr><td>docker-compose pull<\/td><td>&nbsp;# \u62c9\u53d6\u4f9d\u8d56\u955c\u50cf<\/td><\/tr><tr><td>dokcer-compose config<\/td><td># \u68c0\u67e5\u914d\u7f6e<\/td><\/tr><tr><td>dokcer-compose config -q<\/td><td># \u68c0\u67e5\u914d\u7f6e\uff0c\u6709\u95ee\u9898\u624d\u6709\u8f93\u51fa<\/td><\/tr><tr><td>docker-compose restart<\/td><td># \u91cd\u542f\u670d\u52a1<\/td><\/tr><tr><td>docker-compose start &nbsp; &nbsp;<\/td><td># \u542f\u52a8\u670d\u52a1<\/td><\/tr><tr><td>docker-compose stop<\/td><td>&nbsp;# \u505c\u6b62\u670d\u52a1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5 \u547d\u4ee4 docker-compose -h&nbsp; &nbsp; &nbsp; &nbsp; &#038;nbs [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-413","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/comments?post=413"}],"version-history":[{"count":2,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/413\/revisions"}],"predecessor-version":[{"id":429,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/413\/revisions\/429"}],"wp:attachment":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/media?parent=413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/categories?post=413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/tags?post=413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}