{"id":102,"date":"2025-05-27T04:14:05","date_gmt":"2025-05-27T04:14:05","guid":{"rendered":"http:\/\/blog.lapthorne.com.au\/?p=102"},"modified":"2025-05-27T12:17:59","modified_gmt":"2025-05-27T12:17:59","slug":"docker-on-ubuntu","status":"publish","type":"post","link":"https:\/\/blog.lapthorne.com.au\/?p=102","title":{"rendered":"Docker on Ubuntu"},"content":{"rendered":"\n<p>Is what it is, just a page so I don&#8217;t have to remember all this again. <br>Do: Use this if you cant remember the commands<br>Don&#8217;t: Use this if you&#8217;ve never done this before, it&#8217;s not written for you. <\/p>\n\n\n\n<p><br>Deploy Ubuntu to a vm, 24.x worked fine, I&#8217;m sure current is fine. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update &amp;&amp; sudo apt upgrade -y\n\n## you might want nano? \n## depends if you used minimal. \n## #ViSux\nsudo apt install -y apt-transport-https ca-certificates curl software-properties-common\n\n## Get current gpg from website if later than say, 2026?\ncurl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo gpg --dearmor -o \/usr\/share\/keyrings\/docker-archive-keyring.gpg\n\necho \"deb &#91;arch=$(dpkg --print-architecture) signed-by=\/usr\/share\/keyrings\/docker-archive-keyring.gpg] https:\/\/download.docker.com\/linux\/ubuntu $(lsb_release -cs) stable\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list > \/dev\/null\n\n## Don't Skip it, even though you know you want to. \nsudo apt update\n\nsudo apt install -y docker-ce docker-ce-cli containerd.io\n\n## Test Install\ndocker --version \n\n## Init.d\nsudo systemctl enable docker\n\n<\/code><\/pre>\n\n\n\n<p>And we&#8217;re done<\/p>\n\n\n\n<p>Don&#8217;t go looking for where to put the composer file, can go anywhere, you decide. Home is fine too, but, you know&#8230; <\/p>\n\n\n\n<p>To be lazy and edit configs in containers, pull the file to local cd via; <br>docker cp &lt;dockerid>:\/path\/to\/the\/file . <\/p>\n\n\n\n<p>To jump into bash <br>(This is basically useless without the common toolset btw). <br>docker &lt;dockerid> -exec \/bin\/bash<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is what it is, just a page so I don&#8217;t have to remember all this again. Do: Use this if you cant remember the commandsDon&#8217;t: Use this if you&#8217;ve never done this before, it&#8217;s not written for you. Deploy Ubuntu to a vm, 24.x worked fine, I&#8217;m sure current is fine. And we&#8217;re done Don&#8217;t &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.lapthorne.com.au\/?p=102\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Docker on Ubuntu&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-102","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/blog.lapthorne.com.au\/index.php?rest_route=\/wp\/v2\/posts\/102"}],"collection":[{"href":"https:\/\/blog.lapthorne.com.au\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lapthorne.com.au\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lapthorne.com.au\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lapthorne.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=102"}],"version-history":[{"count":3,"href":"https:\/\/blog.lapthorne.com.au\/index.php?rest_route=\/wp\/v2\/posts\/102\/revisions"}],"predecessor-version":[{"id":111,"href":"https:\/\/blog.lapthorne.com.au\/index.php?rest_route=\/wp\/v2\/posts\/102\/revisions\/111"}],"wp:attachment":[{"href":"https:\/\/blog.lapthorne.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lapthorne.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lapthorne.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}