{"id":2171,"date":"2021-12-16T11:06:54","date_gmt":"2021-12-16T16:06:54","guid":{"rendered":"https:\/\/shirishranjit.com\/blog1\/?page_id=2171"},"modified":"2022-01-11T08:49:42","modified_gmt":"2022-01-11T13:49:42","slug":"docker-issue","status":"publish","type":"page","link":"https:\/\/shirishranjit.com\/blog1\/big-data\/docker-primer\/docker-issue","title":{"rendered":"Docker installation Issues and resolution"},"content":{"rendered":"\n<p>If you are having docker command issue most likely you have not performed docker post installation steps. Check the steps <a href=\"https:\/\/docs.docker.com\/engine\/install\/linux-postinstall\/\">here<\/a><\/p>\n\n\n\n<p>Following steps needs to be taken in order for the docker to work<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#create a docker group 'docker' - most of the install creates this by default\nsudo groupadd docker\n#add your user to the docker group\nsudo usermod -aG docker $User\n#activate the docker group\nnewgrp docker <\/code><\/pre>\n\n\n\n<p>Now you should be able to build docker with the user that you added to the group.<\/p>\n\n\n\n<p>This is one of the Issue that you will encounter if you have not done the docker post installation steps.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Got permission denied while trying to connect to the Docker daemon socket at unix:\/\/\/var\/run\/docker.sock<\/p><\/blockquote>\n\n\n\n<p>Check the following command to ensure that you the user that you are using is in the group<\/p>\n\n\n\n<p>list group ids of current user:&nbsp;<code>id --groups<\/code><br \/>show uid:gid of docker.sock:&nbsp;<code>stat \/var\/run\/docker.sock --format '%u:%g<\/code><\/p>\n\n\n\n<p>If the user&#8217;s did is not same as the docker then, you will need the user to add to the gid.<\/p>\n\n\n\n<p>If you have not followed the post-install steps, follow the test in the following post-install reference.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Proxy Configuration:<\/h2>\n\n\n\n<p>If you are being a firewall, you will need to configure proxy setting. <\/p>\n\n\n\n<p>You need to create:<\/p>\n\n\n\n<p>.docker\/config.jason in your home directory of the user that you are doing the docker build.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n \"proxies\":\n {\n   \"default\":\n   {\n     \"httpProxy\": \"http:\/\/192.168.1.12:3128\",\n     \"httpsProxy\": \"http:\/\/192.168.1.12:3128\",\n     \"noProxy\": \"*.test.example.com,.example2.com,127.0.0.0\/8\"\n   }\n }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">References:<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Post installation configurations:<a href=\" https:\/\/docs.docker.com\/engine\/install\/linux-postinstall\/\"> https:\/\/docs.docker.com\/engine\/install\/linux-postinstall\/<\/a><\/li><li>Proxy configurations: <a href=\"https:\/\/docs.docker.com\/network\/proxy\/\">https:\/\/docs.docker.com\/network\/proxy\/<\/a><\/li><\/ul>\n<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Docker+installation+Issues+and+resolution\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/shirishranjit.com\/blog1\/big-data\/docker-primer\/docker-issue\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><div class=\"twttr_followme\">\n\t\t\t\t\t\t<a href=\"https:\/\/twitter.com\/shiranjit\" class=\"twitter-follow-button\" data-size=\"default\"  data-show-screen-name=\"false\"  target=\"_blank\">Follow me<\/a>\n\t\t\t\t\t<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>If you are having docker command issue most likely you have not performed docker post installation steps. Check the steps here Following steps needs to be taken in order for the docker to work Now you should be able to &hellip; <a href=\"https:\/\/shirishranjit.com\/blog1\/big-data\/docker-primer\/docker-issue\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"parent":2199,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2171","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2171"}],"collection":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/comments?post=2171"}],"version-history":[{"count":7,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2171\/revisions"}],"predecessor-version":[{"id":2187,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2171\/revisions\/2187"}],"up":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2199"}],"wp:attachment":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/media?parent=2171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}