{"id":59,"date":"2023-02-22T09:14:20","date_gmt":"2023-02-22T09:14:20","guid":{"rendered":"https:\/\/smartsource.com.sg\/blog\/?p=59"},"modified":"2023-02-22T09:14:20","modified_gmt":"2023-02-22T09:14:20","slug":"how-to-allow-non-root-users-to-run-docker-commands-without-using-sudo","status":"publish","type":"post","link":"https:\/\/smartsource.com.sg\/blog\/index.php\/2023\/02\/22\/how-to-allow-non-root-users-to-run-docker-commands-without-using-sudo\/","title":{"rendered":"How to allow non root users to run docker commands without using sudo"},"content":{"rendered":"\n<p>Although the docker daemon runs as root, it is sometimes useful to grant non root user to run docker commands without the need to use sudo each time. To achieve this add the current user to the docker group. Run the below commands<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo groupadd docker\r\nsudo usermod -aG docker $USER\r\n# to refresh the group settings\r\nnewgrp docker\r\ndocker ps<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Although the docker daemon runs as root, it is sometimes useful to grant non root user to run docker commands without the need to use sudo each time. To achieve&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[24,42],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-docker","tag-sudo"],"_links":{"self":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":1,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/59\/revisions\/60"}],"wp:attachment":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}