{"id":1971,"date":"2020-06-01T11:21:45","date_gmt":"2020-06-01T08:21:45","guid":{"rendered":"https:\/\/artem.services\/?p=1969"},"modified":"2020-06-01T11:34:14","modified_gmt":"2020-06-01T08:34:14","slug":"1971","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=1971&lang=en","title":{"rendered":"FIX ERROR &#8212; Jenkins: dial unix \/var\/run\/docker.sock: connect: permission denied"},"content":{"rendered":"<p>After we installed <strong>Docker<\/strong> on the <strong>Jenkins<\/strong> server and started it, when we try to build, we get the following error:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ndial unix \/var\/run\/docker.sock: connect: permission denied\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>Solution:<\/h3>\n<p>Add the user &quot;<strong>jenkins<\/strong>&quot; to the &quot;<strong>docker<\/strong>&quot; group:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo usermod -aG docker jenkins\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>After that, the user &quot;<strong>jenkins<\/strong>&quot; will be able to work with <strong>Docker<\/strong> if he connects via <strong>SSH<\/strong>, but with <strong>Jenkins<\/strong> job there will still be the same error, to get rid of it, you need to restart the <strong>Jenkins<\/strong> service:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo systemctl restart jenkins\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>After we installed Docker on the Jenkins server and started it, when we try to build, we get the following error: &nbsp; Solution: Add the user &quot;jenkins&quot; to the &quot;docker&quot; group: &nbsp; After that, the user &quot;jenkins&quot; will be able to work with Docker if he connects via SSH, but with Jenkins job there will &hellip; <a href=\"https:\/\/artem.services\/?p=1971&#038;lang=en\" class=\"more-link\">\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u044c<span class=\"screen-reader-text\"> &quot;FIX ERROR &#8212; Jenkins: dial unix \/var\/run\/docker.sock: connect: permission denied&quot;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[613,975,357],"tags":[771,361,365,617],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1971"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1971"}],"version-history":[{"count":2,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1971\/revisions"}],"predecessor-version":[{"id":1973,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1971\/revisions\/1973"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}