{"id":1156,"date":"2014-09-04T22:22:12","date_gmt":"2014-09-04T21:22:12","guid":{"rendered":"http:\/\/www.tekhead.org\/blog\/?p=1156"},"modified":"2016-03-02T21:43:28","modified_gmt":"2016-03-02T21:43:28","slug":"installing-docker-on-ubuntu-quick-fix","status":"publish","type":"post","link":"https:\/\/tekhead.it\/blog\/2014\/09\/installing-docker-on-ubuntu-quick-fix\/","title":{"rendered":"Installing Docker on Ubuntu Quick Fix"},"content":{"rendered":"<p>I was installing Docker on Ubuntu (14.04.1 LTS)\u00a0in my home lab for the first time following the instructions at\u00a0<a title=\"Docker install on Ubuntu\" href=\"thttp:\/\/docs.docker.com\/installation\/ubuntulinux\/\" target=\"_blank\">http:\/\/docs.docker.com\/installation\/ubuntulinux\/<\/a> this evening and came across an issue.<\/p>\n<p>Docker would not start and was showing the following error:<\/p>\n<pre>Cannot connect to the Docker daemon. Is 'docker -d' running on this host?<\/pre>\n<p><br style=\"height: 1em;\" \/>Checking processes I don&#8217;t see docker running:<\/p>\n<pre>$ ps -ef | grep docker<\/pre>\n<pre>alex\u00a0 \u00a0 \u00a0 3703\u00a0 2113\u00a0 0 21:27 pts\/0\u00a0 \u00a0 00:00:00 grep --color=auto <span style=\"color: #c33720;\">docker<\/span><\/pre>\n<p><br style=\"height: 1em;\" \/>Trying to start docker generated the following errors in <em>\/var\/log\/syslog<\/em>:<\/p>\n<pre>kernel: [\u00a0 608.236848] init: docker main process ended, respawning<\/pre>\n<pre>kernel: [\u00a0 608.451873] init: docker main process (4230) terminated with status 1<\/pre>\n<pre>kernel: [\u00a0 608.451906] init: docker main process ended, respawning<\/pre>\n<pre>kernel: [\u00a0 608.676417] init: docker main process (4280) terminated with status 1<\/pre>\n<pre>kernel: [\u00a0 608.676445] init: docker respawning too fast, stopped<\/pre>\n<p><br style=\"height: 1em;\" \/>After trying a bunch of different fixes which didn&#8217;t work, then looked up the docker log at <em>\/var\/log\/upstart\/docker.log<\/em>, which displayed the following:<\/p>\n<pre>Error loading docker apparmor profile: fork\/exec\/sbin\/apparmor_parser: no such file or directory ()<\/pre>\n<p><br style=\"height: 1em;\" \/>A quick install of apparmor fixed this!<\/p>\n<pre><span style=\"color: #333333;\">$ sudo apt-get install apparmor<\/span><\/pre>\n<p><br style=\"height: 1em;\" \/>And now&#8230;<\/p>\n<pre>$ ps -ef | grep docker<\/pre>\n<pre>root\u00a0 \u00a0 \u00a0 4577 \u00a0 \u00a0 1\u00a0 0 21:44 ?\u00a0 \u00a0 \u00a0 \u00a0 00:00:00 \/usr\/bin\/<span style=\"color: #c33720;\"><b>docker<\/b><\/span> -d<\/pre>\n<pre>alex\u00a0 \u00a0 \u00a0 4608\u00a0 2574\u00a0 0 21:45 pts\/0\u00a0 \u00a0 00:00:00 grep --color=auto <span style=\"color: #c33720;\"><b>docker<\/b><\/span><\/pre>\n<pre>$ sudo docker info<\/pre>\n<pre>Containers: 0<\/pre>\n<pre>Images: 0<\/pre>\n<pre>Storage Driver: devicemapper<\/pre>\n<pre>\u00a0Pool Name: docker-8:1-156936-pool<\/pre>\n<pre>\u00a0Pool Blocksize: 64 Kb<\/pre>\n<pre>\u00a0Data file: \/var\/lib\/docker\/devicemapper\/devicemapper\/data<\/pre>\n<pre>\u00a0Metadata file: \/var\/lib\/docker\/devicemapper\/devicemapper\/metadata<\/pre>\n<pre>\u00a0Data Space Used: 291.5 Mb<\/pre>\n<pre>\u00a0Data Space Total: 102400.0 Mb<\/pre>\n<pre>\u00a0Metadata Space Used: 0.7 Mb<\/pre>\n<pre>\u00a0Metadata Space Total: 2048.0 Mb<\/pre>\n<pre>Execution Driver: native-0.2<\/pre>\n<pre>Kernel Version: 3.13.0-35-generic<\/pre>\n<pre>Operating System: Ubuntu 14.04.1 LTS<\/pre>\n<p><br style=\"height: 1em;\" \/>Happy Days! I\u00a0hope this saves others some time!<\/p>\n<p>If you found this post useful, check out my Docker HOWTO series &#8211; the first post is here:<br \/>\n<a href=\"http:\/\/tekhead.it\/blog\/2014\/09\/docker-part-1-introduction-and-howto-install-docker-on-ubuntu-14-04-lts\/\">http:\/\/tekhead.it\/blog\/2014\/09\/docker-part-1-introduction-and-howto-install-docker-on-ubuntu-14-04-lts\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was installing Docker on Ubuntu (14.04.1 LTS)\u00a0in my home lab for the first time following the instructions at\u00a0http:\/\/docs.docker.com\/installation\/ubuntulinux\/ this evening and came across an issue. Docker would [..]<\/p>\n","protected":false},"author":1,"featured_media":1157,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[337],"tags":[334,335,336,332,333,58],"class_list":["post-1156","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker-2","tag-14-04-1","tag-apparmor","tag-dependencies","tag-docker","tag-lts","tag-ubuntu"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2014\/09\/dockerlogo-e1452888993804.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2l3lU-iE","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/comments?post=1156"}],"version-history":[{"count":1,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1156\/revisions"}],"predecessor-version":[{"id":1158,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1156\/revisions\/1158"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/media\/1157"}],"wp:attachment":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/media?parent=1156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/categories?post=1156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/tags?post=1156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}