Docker Running on Core Linux
Is it possible? … Yes? However I didn’t write down some of the pre-requisites for the Core Server (whoops, maybe one day I’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…
In my previous post I mentioned that Docker wouldn’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… but what about Docker itself.
Now I got this “working” but I didn’t exactly write down all my steps (it took a long time to figure out). From looking at the VM’s history looks like I simply used the tc account to download and extract the base Docker binaries:
now this doesn’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.
Reviewing my AI chat and notes I took, and getting it running again after a reboot, it seem after the “install” (copy base files to path shown above image, line 51) I also added “var/lib/docker” and “etc/docker” to the filetool.lst file, so they stay persisted after reboot. Strangely only /var/lib/docker is populated, but I can’t see how that’s the case from the history review. I was pretty positive the script itself failed to execute… I really should start from scratch else this post will be a bit useless…. butt…. F*** it….
The next issues seems to be tired to cgroups and certificates…
Fixing Cgroups Error
sudo mount -t tmpfs cgroup_root /sys/fs/cgroup/ sudo mkdir /sys/fs/cgroup/devices sudo mount -t cgroup -o devices none /sys/fs/cgroup/devices
That should be it… but we need this to be persisted and auto run at boot time so we don’t have to do this every time…
sudo vi /opt/dockerd.sh i mount -t tmpfs cgroup_root /sys/fs/cgroup/ mkdir /sys/fs/cgroup/devices mount -t cgroup -o devices none /sys/fs/cgroup/devices ESC :wq sudo vi /opt/bootlocal.sh *append with* /opt/dockerd.sh :wq sudo chmod +x /opt/dockerd.sh filetool.sh -b
The next issue seems that docker would load, but when pulling a container to load it would just seem to fail complaining about certificates.
Fixing Certificate Error
I found the point in my notes rambling with AI when I figured it out…
“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… 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 & sudo docker pull hello-world and guess what it finally freaking worked”
But I realized instead of copying them I could just make a symlink
sudo mkdir /etc/ssl/ ln -s /usr/local/etc/ssl/certs/ /etc/ssl/
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.
And finally…
Running Dockerd
sudo DOCKER_RAMDISK=true dockerd &
Pulling Image
sudo docker pull hello-world
Running Image
sudo docker run --rm hello-world
Yay we actually ran a container from Core Linux.. Mind Blown… I swear I had it all running at only 90MB of RAM, but checking now show 116MB Bah…
To get Docker to run at boot my final /opt/dockerd.sh looked like this: