{"id":10,"date":"2017-04-19T17:20:48","date_gmt":"2017-04-19T09:20:48","guid":{"rendered":"http:\/\/www.myway5.com\/?p=10"},"modified":"2017-04-19T18:15:29","modified_gmt":"2017-04-19T10:15:29","slug":"ubuntu-docker-problem","status":"publish","type":"post","link":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/","title":{"rendered":"Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55"},"content":{"rendered":"<p>Ubuntu\u4e0b\u5b89\u88c5docker\u7684\u51e0\u70b9\u95ee\u9898\u8bb0\u5f55<\/p>\n<p>1.\u8981\u6ce8\u610f\u7cfb\u7edf\u7684\u5185\u6838\u548c\u7248\u672c\u662f\u5426\u652f\u6301\uff0c\u5185\u6838\u6700\u4f4e\u8981\u6c42\u4e3a3.10\uff0c\u7248\u672c\u6700\u4f4e\u4e3a12.04\uff0c\u8fd9\u4e24\u70b9\u5fc5\u987b\u540c\u65f6\u6ee1\u8db3\u3002<br \/>\n\u4f7f\u7528<code>uname -a<\/code>\u67e5\u770b\u7cfb\u7edf\u5185\u6838<br \/>\n<code>Linux jiang-PC 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU\/Linux<\/code><br \/>\n\u8fd9\u91cc4.4.0-72\u5219\u662f\u5185\u6838\u7684\u7248\u672c\u53f7<br \/>\n\u4f7f\u7528<code>cat \/etc\/issue<\/code>\u67e5\u770b\u7cfb\u7edf\u7248\u672c\u53f7<br \/>\n<code>Ubuntu 16.04 LTS \\n \\l<\/code><\/p>\n<p>2.\u6ce8\u610f\u67e5\u770bdocker\u7684\u65e5\u5fd7\u8bb0\u5f55<br \/>\n\u4f7f\u7528service docker start(\u6216\u8005systemctl docker start)\u542f\u52a8docker\u65f6\uff0c\u6ca1\u6709\u4efb\u4f55\u8f93\u51fa\u63d0\u793a\uff0c\u4f46\u662f\u5f80\u540e\u6267\u884c\u53ef\u80fd\u5c31\u53d1\u73b0docker\u6ca1\u6709\u6b63\u5e38\u542f\u52a8\uff0c\u4f46\u662f\u53c8\u4e0d\u77e5\u9053\u95ee\u9898\u51fa\u5728\u54ea\u91cc\u3002\/var\/log\/upstart\/docker.log\u8bb0\u5f55\u4e86docker\u542f\u52a8\u65e5\u5fd7\u3002<\/p>\n<p>3.AppArmor\u7684\u95ee\u9898<br \/>\nAppArmor enabled on system but the docker-default profile could not be loaded\u3002\u51fa\u73b0\u8fd9\u4e2a\u95ee\u9898\u65f6\uff0c\u4f7f\u7528<br \/>\n<code>apt-get install apparmor<\/code>\u5373\u53ef\u89e3\u51b3<\/p>\n<p>\u9644\u4e00\u6bb5webserver\u7684Dockerfile\uff1a<\/p>\n<pre><code># \u8fd9\u662f\u670d\u52a1\u5668\u73af\u5883\u7684Docker,\u4f1a\u5b89\u88c5\u597dphp,nginx\u7b49\u73af\u5883\uff0c\u5e76\u4e14\u8fdb\u884c\u914d\u7f6e\n# author:jiangpengfei\n# date: 2017-04-19\n\nFROM ubuntu:16.04\nRUN apt-get update \\\n    &amp;&amp; DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common \\\n    &amp;&amp; DEBIAN_FRONTEND=noninteractive apt-add-repository -y ppa:nginx\/stable \\\n    &amp;&amp; DEBIAN_FRONTEND=noninteractive apt-get update \\\n    &amp;&amp; DEBIAN_FRONTEND=noninteractive apt-get install -y nginx\nRUN DEBIAN_FRONTEND=noninteractive apt-get install -y php7.0\nRUN DEBIAN_FRONTEND=noninteractive apt-get install -y php-redis\nRUN DEBIAN_FRONTEND=noninteractive apt-get install -y php-mysql\nRUN DEBIAN_FRONTEND=noninteractive apt-get install -y php-imagick \\\n    &amp;&amp; apt-get autoremove \\\n    &amp;&amp; apt-get autoclean\n# \u4e0a\u9762\u662f\u4eceubuntu\u7684\u6e90\u4e2d\u5b89\u88c5\u5fc5\u8981\u7ec4\u4ef6\uff0c\u4e0b\u9762\u5f00\u59cb\u8fdb\u884c\u914d\u7f6e\nRUN mkdir \/var\/www\/family \\\n    &amp;&amp; mkdir -p \/var\/log\/nginx\/access\/ \\\n    &amp;&amp; touch \/var\/log\/nginx\/access\/default.log\n\nCOPY family \/etc\/nginx\/sites-enabled \nCOPY start.sh \/usr\/local\/bin\nEXPOSE 9090 81\nCMD [\"start.sh\"]\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu\u4e0b\u5b89\u88c5docker\u7684\u51e0\u70b9\u95ee\u9898\u8bb0\u5f55 1.\u8981\u6ce8\u610f\u7cfb\u7edf\u7684\u5185\u6838\u548c\u7248\u672c\u662f\u5426\u652f\u6301\uff0c\u5185\u6838\u6700\u4f4e\u8981\u6c42\u4e3a3.10\uff0c\u7248\u672c &hellip; <a href=\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,7],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-linux","category-problem"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55 - \u4e00\u53ea\u5b89\u9759\u7684\u732b<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"og:description\" content=\"Ubuntu\u4e0b\u5b89\u88c5docker\u7684\u51e0\u70b9\u95ee\u9898\u8bb0\u5f55 1.\u8981\u6ce8\u610f\u7cfb\u7edf\u7684\u5185\u6838\u548c\u7248\u672c\u662f\u5426\u652f\u6301\uff0c\u5185\u6838\u6700\u4f4e\u8981\u6c42\u4e3a3.10\uff0c\u7248\u672c &hellip; \u7ee7\u7eed\u9605\u8bfbUbuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/\" \/>\n<meta property=\"og:site_name\" content=\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"article:published_time\" content=\"2017-04-19T09:20:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-19T10:15:29+00:00\" \/>\n<meta name=\"author\" content=\"jiangpengfei\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"jiangpengfei\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/\"},\"author\":{\"name\":\"jiangpengfei\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"headline\":\"Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55\",\"datePublished\":\"2017-04-19T09:20:48+00:00\",\"dateModified\":\"2017-04-19T10:15:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/\"},\"wordCount\":35,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"articleSection\":[\"linux\",\"\u95ee\u9898\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/\",\"url\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/\",\"name\":\"Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/#website\"},\"datePublished\":\"2017-04-19T09:20:48+00:00\",\"dateModified\":\"2017-04-19T10:15:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.myway5.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.myway5.com\/#website\",\"url\":\"https:\/\/www.myway5.com\/\",\"name\":\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"description\":\"\u60f3\u5565\u5462\",\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.myway5.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\",\"name\":\"jiangpengfei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"caption\":\"jiangpengfei\"},\"logo\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.myway5.com\/index.php\/author\/joyme\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/","og_locale":"zh_CN","og_type":"article","og_title":"Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","og_description":"Ubuntu\u4e0b\u5b89\u88c5docker\u7684\u51e0\u70b9\u95ee\u9898\u8bb0\u5f55 1.\u8981\u6ce8\u610f\u7cfb\u7edf\u7684\u5185\u6838\u548c\u7248\u672c\u662f\u5426\u652f\u6301\uff0c\u5185\u6838\u6700\u4f4e\u8981\u6c42\u4e3a3.10\uff0c\u7248\u672c &hellip; \u7ee7\u7eed\u9605\u8bfbUbuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55","og_url":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/","og_site_name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","article_published_time":"2017-04-19T09:20:48+00:00","article_modified_time":"2017-04-19T10:15:29+00:00","author":"jiangpengfei","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"jiangpengfei","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/#article","isPartOf":{"@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/"},"author":{"name":"jiangpengfei","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"headline":"Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55","datePublished":"2017-04-19T09:20:48+00:00","dateModified":"2017-04-19T10:15:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/"},"wordCount":35,"commentCount":0,"publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"articleSection":["linux","\u95ee\u9898"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/","url":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/","name":"Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","isPartOf":{"@id":"https:\/\/www.myway5.com\/#website"},"datePublished":"2017-04-19T09:20:48+00:00","dateModified":"2017-04-19T10:15:29+00:00","breadcrumb":{"@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/ubuntu-docker-problem\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.myway5.com\/"},{"@type":"ListItem","position":2,"name":"Ubuntu\u4e0bDocker\u5b89\u88c5\u9047\u5230\u7684\u95ee\u9898\u8bb0\u5f55"}]},{"@type":"WebSite","@id":"https:\/\/www.myway5.com\/#website","url":"https:\/\/www.myway5.com\/","name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","description":"\u60f3\u5565\u5462","publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.myway5.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685","name":"jiangpengfei","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","caption":"jiangpengfei"},"logo":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/"},"url":"https:\/\/www.myway5.com\/index.php\/author\/joyme\/"}]}},"views":5272,"_links":{"self":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":1,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":11,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/10\/revisions\/11"}],"wp:attachment":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}