{"id":3851,"date":"2023-07-23T16:56:46","date_gmt":"2023-07-23T16:56:46","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=3851"},"modified":"2023-07-23T16:58:23","modified_gmt":"2023-07-23T16:58:23","slug":"docker-install-on-ubuntu-22-04-2-lts","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=3851","title":{"rendered":"Docker Install on Ubuntu 22.04.2 LTS"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To install Docker on Ubuntu 22.04.2 LTS you can use these simple instructions, these are based on a standard Ubuntu 22.04.2 LTS installation and using a user called &#8220;ubuntu&#8221;.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/tmp\n\ncurl -o \/tmp\/get-docker.sh https:\/\/get.docker.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once downloaded make sure it is executable with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod u+x get-docker.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now run the installation with the following, the script has sudo commands added so you may need to re-enter your password. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/get-docker.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After a short while it should be installed, to test now run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker run hello-world<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If all is well you&#8217;ll get a message saying it has run the docker container correctly and provided a result.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As we don&#8217;t want to run sudo for each time we want to use docker, we need to add our &#8220;ubuntu&#8221; user into the Docker group.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -aG docker ubuntu<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once that is done, log out and back in again to re-enumerate the permissions, and let&#8217;s test again, if you can run without prefixing the command with &#8220;sudo&#8221;, we&#8217;re all set!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run hello-world<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"643\" height=\"366\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/07\/image-10.png\" alt=\"\" class=\"wp-image-3852\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/07\/image-10.png 643w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/07\/image-10-300x171.png 300w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/unsplash.com\/@carrier_lost\" data-type=\"URL\" data-id=\"https:\/\/unsplash.com\/@carrier_lost\" target=\"_blank\" rel=\"noreferrer noopener\">Image Attribution<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To install Docker on Ubuntu 22.04.2 LTS you can use these simple instructions, these are based on a standard Ubuntu 22.04.2 LTS installation and using a user called &#8220;ubuntu&#8221;. Once downloaded make sure it is executable with: Now run the installation with the following, the script has sudo commands added so you may need to &#8230; <a title=\"Docker Install on Ubuntu 22.04.2 LTS\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=3851\" aria-label=\"Read more about Docker Install on Ubuntu 22.04.2 LTS\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":3855,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[],"class_list":["post-3851","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3851"}],"version-history":[{"count":2,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3851\/revisions"}],"predecessor-version":[{"id":3856,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3851\/revisions\/3856"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/media\/3855"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}