{"id":1718,"date":"2025-10-11T15:29:31","date_gmt":"2025-10-11T20:29:31","guid":{"rendered":"https:\/\/zewwy.ca\/?p=1718"},"modified":"2025-11-17T13:51:09","modified_gmt":"2025-11-17T19:51:09","slug":"docker-on-core-linux","status":"publish","type":"post","link":"https:\/\/zewwy.ca\/index.php\/2025\/10\/11\/docker-on-core-linux\/","title":{"rendered":"Docker on Core Linux"},"content":{"rendered":"<h1 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Docker_Running_on_Core_Linux\"><\/span>Docker Running on Core Linux<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>Is it possible? &#8230; Yes? However I didn&#8217;t write down some of the pre-requisites for the Core Server (whoops, maybe one day I&#8217;ll redo it from scratch). But if you do manage to get the base binaries installed this post should be helpful for all the caveats I faced along the way&#8230;<\/p>\n<p>In my previous post I mentioned that Docker wouldn&#8217;t run unless it was 64bit machine, so I created a Core Linux 64 bit image and showed how to get the base OS up and running&#8230; but what about Docker itself.<\/p>\n<p>Now I got this &#8220;working&#8221; but I didn&#8217;t exactly write down all my steps (it took a long time to figure out). From looking at the VM&#8217;s history looks like I simply used the tc account to download and extract the base Docker binaries:<\/p>\n<p><a href=\"https:\/\/i.imgur.com\/0hGUf4x.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i.imgur.com\/0hGUf4x.png\" alt=\"\" width=\"716\" height=\"357\" \/><\/a><\/p>\n<p>now this doesn&#8217;t tell me the relative path I was on when some of the relative paths are called, but I do know it was the tc account so some safe assumptions can be made.<\/p>\n<p>Reviewing my AI chat and notes I took, and getting it running again after a reboot, it seem after the &#8220;install&#8221; (copy base files to path shown above image, line 51) I also added &#8220;var\/lib\/docker&#8221; and &#8220;etc\/docker&#8221; to the filetool.lst file, so they stay persisted after reboot. Strangely only \/var\/lib\/docker is populated, but I can&#8217;t see how that&#8217;s the case from the history review. I was pretty positive the script itself failed to execute&#8230; I really should start from scratch else this post will be a bit useless&#8230;. butt&#8230;. F*** it&#8230;.<\/p>\n<p>The next issues seems to be tired to cgroups and certificates&#8230;<\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Fixing_Cgroups_Error\"><\/span>Fixing Cgroups Error<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre>sudo mount -t tmpfs cgroup_root \/sys\/fs\/cgroup\/\r\nsudo mkdir \/sys\/fs\/cgroup\/devices\r\nsudo mount -t cgroup -o devices none \/sys\/fs\/cgroup\/devices<\/pre>\n<p>That should be it&#8230; but we need this to be persisted and auto run at boot time so we don&#8217;t have to do this every time&#8230;<\/p>\n<pre>sudo vi \/opt\/dockerd.sh\r\ni\r\nmount -t tmpfs cgroup_root \/sys\/fs\/cgroup\/\r\nmkdir \/sys\/fs\/cgroup\/devices\r\nmount -t cgroup -o devices none \/sys\/fs\/cgroup\/devices\r\nESC\r\n:wq\r\nsudo vi \/opt\/bootlocal.sh\r\n*append with*\r\n\/opt\/dockerd.sh\r\n:wq\r\nsudo chmod +x \/opt\/dockerd.sh\r\nfiletool.sh -b<\/pre>\n<p><a href=\"https:\/\/i.imgur.com\/fJ5FdSM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i.imgur.com\/fJ5FdSM.png\" alt=\"\" width=\"515\" height=\"82\" \/><\/a><\/p>\n<p>The next issue seems that docker would load, but when pulling a container to load it would just seem to fail complaining about certificates.<\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Fixing_Certificate_Error\"><\/span>Fixing Certificate Error<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>I found the point in my notes rambling with AI when I figured it out&#8230;<\/p>\n<p>&#8220;NO F***KIN WAY!!!!!!! https:\/\/stackoverflow.com\/questions\/75696690\/how-to-resolve-tls-failed-to-verify-certificate-x509-certificate-signed-by-un I read this thread and read the answer by Andrei Nicolae&#8230; which said just durr copy ca certs to \/etc\/ssl\/certs I was like, I bet docker is hard coded to look there, which is why it was first suggested but all other apps on tiny core linux know to use \/usr\/local\/etc\/ssl\/certs, so yeah docker never was using the expectects paths liek I suspected from the begining cause we manualy installed it for a OS not supported. so with this I did sudo mkdir -p \/etc\/ssl\/certs sudo cp \/usr\/local\/etc\/ssl\/certs\/* \/etc\/ssl\/certs sudo pkill dockerd sudo dockerd &amp; sudo docker pull hello-world and guess what it finally freaking worked&#8221;<\/p>\n<p>But I realized instead of copying them I could just make a symlink<\/p>\n<pre>sudo mkdir \/etc\/ssl\/\r\nln -s \/usr\/local\/etc\/ssl\/certs\/ \/etc\/ssl\/<\/pre>\n<p>I simply placed these lines in \/opt\/dockerd.sh file I created earlier, rebooted and verified that \/etc\/ssl\/certs was populated with certs and it was.<\/p>\n<p>And finally&#8230;<\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Running_Dockerd\"><\/span>Running Dockerd<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre>sudo DOCKER_RAMDISK=true dockerd &amp;<\/pre>\n<p><a href=\"https:\/\/i.imgur.com\/qsEHbo9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i.imgur.com\/qsEHbo9.png\" alt=\"\" width=\"688\" height=\"120\" \/><\/a><\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Pulling_Image\"><\/span>Pulling Image<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre>sudo docker pull hello-world<\/pre>\n<p><a href=\"https:\/\/i.imgur.com\/8pYYFGm.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i.imgur.com\/8pYYFGm.png\" alt=\"\" width=\"695\" height=\"134\" \/><\/a><\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Running_Image\"><\/span>Running Image<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre>sudo docker run --rm hello-world<\/pre>\n<p><a href=\"https:\/\/i.imgur.com\/yeX2tee.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i.imgur.com\/yeX2tee.png\" alt=\"\" width=\"722\" height=\"405\" \/><\/a><\/p>\n<p>Yay we actually ran a container from Core Linux.. Mind Blown&#8230; I swear I had it all running at only 90MB of RAM, but checking now show 116MB Bah&#8230;<\/p>\n<p><a href=\"https:\/\/i.imgur.com\/kblHeyk.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i.imgur.com\/kblHeyk.png\" alt=\"\" width=\"721\" height=\"459\" \/><\/a><\/p>\n<p>To get Docker to run at boot my final \/opt\/dockerd.sh looked like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i.imgur.com\/6oV0h61.png\" alt=\"\" width=\"507\" height=\"117\" \/><\/p>\n<p>*Update* outisde of hello world I wasn&#8217;t able to spin up any other real containers due to other technical limitations, this was a huge waste of time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker Running on Core Linux Is it possible? &#8230; Yes? However I didn&#8217;t write down some of the pre-requisites for the Core Server (whoops, maybe one day I&#8217;ll redo it from scratch). But if you do manage to get the base binaries installed this post should be helpful for all the caveats I faced along &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/zewwy.ca\/index.php\/2025\/10\/11\/docker-on-core-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Docker on Core Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","footnotes":""},"categories":[8],"tags":[24,280],"class_list":["post-1718","post","type-post","status-publish","format-standard","hentry","category-server-administration","tag-core","tag-docker"],"_links":{"self":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/1718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/comments?post=1718"}],"version-history":[{"count":2,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/1718\/revisions"}],"predecessor-version":[{"id":1729,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/1718\/revisions\/1729"}],"wp:attachment":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/media?parent=1718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/categories?post=1718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/tags?post=1718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}