{"id":1702,"date":"2024-12-08T18:53:02","date_gmt":"2024-12-08T10:53:02","guid":{"rendered":"https:\/\/note.ui11.cc\/?p=1702"},"modified":"2024-12-08T18:53:05","modified_gmt":"2024-12-08T10:53:05","slug":"docker%e5%b8%b8%e8%a7%81%e5%91%bd%e4%bb%a4%ef%bc%9a","status":"publish","type":"post","link":"https:\/\/note.ui11.cc\/index.php\/2024\/12\/08\/docker%e5%b8%b8%e8%a7%81%e5%91%bd%e4%bb%a4%ef%bc%9a\/","title":{"rendered":"Docker\u5e38\u89c1\u547d\u4ee4\uff1a"},"content":{"rendered":"\n<p>\u52a0\u8f7dtar\u5305\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker load -i jdk.tar(tar\u5305\u53ef\u6362)\n<\/code><\/pre>\n\n\n\n<p>\u67e5\u770b\u955c\u50cf\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker images\n<\/code><\/pre>\n\n\n\n<p>\u67e5\u770b\u65e5\u5fd7\uff1adocker logs -f \u5bb9\u5668\u540d<\/p>\n\n\n\n<p>\u67e5\u770b\u5bb9\u5668\uff1adocker inspect \u5bb9\u5668\u540d<\/p>\n\n\n\n<p>\u67e5\u770bdocker\u4e2d\u7684\u5bb9\u5668\uff1adocker ps<\/p>\n\n\n\n<p>\u5220\u9664\u5bb9\u5668\uff1adocker rm \u5bb9\u5668\u540d<\/p>\n\n\n\n<p>\u5220\u9664\u955c\u50cf\uff1adocker rmi \u955c\u50cf\u540d<\/p>\n\n\n\n<p>\u90e8\u7f72mysql:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d \\\n  --name mysql \\\n  -p 3307:3306 \\\n  -e TZ=Asia\/Shanghai \\\n  -e MYSQL_ROOT_PASSWORD=123 \\\n  mysql<\/code><\/pre>\n\n\n\n<p>\u521b\u5efanginx\u5bb9\u5668\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d --name nginx -p 81:80 nginx<\/code><\/pre>\n\n\n\n<p>\u6784\u5efa\u955c\u50cf\uff1adocker build -t hmall .      \uff08\u4f1a\u5230Dockerfile\u6587\u4ef6\u4e2d\u53bb\u6267\u884c\u547d\u4ee4\uff09\u6784\u5efa\u955c\u50cf<\/p>\n\n\n\n<p>docker run -d &#8211;name hm -p 8081:8080 &#8211;network fyc hamll\uff08\u521b\u5efa\u5bb9\u5668\uff09<\/p>\n\n\n\n<p>\u67e5\u770b\u5bb9\u5668\u8fde\u63a5\u7684\u7f51\u7edc\u4fe1\u606f\uff1adocker inspect \u5bb9\u5668\u540d<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u52a0\u8f7dtar\u5305\uff1a \u67e5\u770b\u955c\u50cf\uff1a \u67e5\u770b\u65e5\u5fd7\uff1adocker logs -f \u5bb9\u5668\u540d \u67e5\u770b\u5bb9\u5668\uff1adocker inspe [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-1702","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/posts\/1702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/comments?post=1702"}],"version-history":[{"count":1,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/posts\/1702\/revisions"}],"predecessor-version":[{"id":1706,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/posts\/1702\/revisions\/1706"}],"wp:attachment":[{"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/media?parent=1702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/categories?post=1702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/tags?post=1702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}