Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: Carsten on April 01, 2018, 06:26:44 AM
-
Hi,
I hope I'm not missing the obvious. I googled for this quite a lot but didn't find anything relevant.
Is it possible to install docker in TCL x64? I'm using TCL in VirtualBox for various things and I would like to also use it for Docker. Means, docker WITHIN TCL, rather than TCL as a Container. I don't want to use the docker-machine or the Toolbox, since I want to keep the host machine untouched as far as possible.
I found a post talking about a docker.tcz for TCL 5.0, but that is quite a number of years ago and I couldn't find anything after that.
Is there any way to get Docker working in TCL x64, so that I can run Containers from there?
Regards
Carsten
-
did you see this:
http://forum.tinycorelinux.net/index.php/topic,21089.msg131763.html#msg131763
-
Hi Juanito,
I did. He started off with building docker. Unfortunately, I'm not into that and I'm far away from dealing with gcc etc.
I was hoping there was something available. Not necessarily a ready made tcz, but if there was a distribution pack I could download from somewhere which could run on TCL, I'd be happy to go with that.
Would you know of anything?
Regards
Carsten
-
You could pm @paulscode and ask for a copy of the docker extension he had working?
-
Hi Juanito,
I did PM him, but no response.
Nevertheless, I managed to build a new image with CONFIG_OVERLAY_FS enabled and CONFIG_OVERLAY_FS_REDIRECT_DIR and CONFIG_OVERLAY_FS_INDEX as well (since in the "make bzImage" asked for it).
Docker (18.03.0-ce) is now getting beyond the OVERLAY complaint (so the new boot image is working ok), but now I'm getting stuck at errors saying, that cgroups is not mounted. I saw in other posts that cgroups are being reported as being initialized, but I can't find anything in my dmesg.
I checked the .config file and almost everything concerning cgroups is activated.
I'm running the latest corepure64 in VirtualBox and I tried KVM as well as HyperV, but that didn't make any difference. Is there anything else I need to activate in the .config file?
Regards
Carsten
-
sorry, but I don't very much about this kind of thing :(
-
Hi Carsten
Just a few thoughts:
Nevertheless, I managed to build a new image with CONFIG_OVERLAY_FS enabled and CONFIG_OVERLAY_FS_REDIRECT_DIR and CONFIG_OVERLAY_FS_INDEX as well (since in the "make bzImage" asked for it).
You followed Juanitos instructions from here:
http://forum.tinycorelinux.net/index.php/topic,21079.msg136147.html#msg136147
Especially the part that reads:
..then use "make menuconfig" to make your changes and, once done, "make"
I ask because in this post:
http://forum.tinycorelinux.net/index.php/topic,21079.msg131677.html#msg131677
paulscode is using an editor to make changes to the config file, which is a bad idea. The configuration option you change
may depend on other options, or be a dependency of other options. Using make menuconfig for your changes resolves
any dependencies for you.
I'm running the latest corepure64 in VirtualBox and I tried KVM as well as HyperV, but that didn't make any difference. Is there anything else I need to activate in the .config file?
Have you tried running on bare metal to make sure the virtualization isn't causing any issues?
I saw in other posts that cgroups are being reported as being initialized, but I can't find anything in my dmesg.
This appears to be well written and is worth looking at:
https://0xax.gitbooks.io/linux-insides/content/Cgroups/linux-cgroups-1.html
... but now I'm getting stuck at errors saying, that cgroups is not mounted.
If you post the exact error messages someone might be able to provide some insight as to the cause.
-
@carsten, it is possible to run dockerd and docker containers in TC x86_64 10.x without either rebuilding the kernel or building a tiny core package. I am doing it right now. Docker's documentation reveals that a kernel with overlay is required for docker only when using the default docker filesystem, but not if you use, e.g., btrfs for your docker filesystem.
1. These are required for docker:
net-bridging-4.19.10-tinycore64.tcz
iptables.tcz
openssl.tcz
ca-certificates.tcz
2. And these are required for btrfs:
raid-dm-4.19.10-tinycore64.tcz
filesystems-4.19.10-tinycore64.tcz
3. And this is required once to create a new btrfs volume:
btrfs-progs.tcz
4. Create a btrfs volume. (May require a bit of research.)
5. Create /etc/docker/daemon.json:
{
"storage-driver": "btrfs"
}
6. Download this cgroupfs-mount script:
wget https://raw.githubusercontent.com/tianon/cgroupfs-mount/master/cgroupfs-mount
chmod 755 cgroupfs-mount
7. Do these:
sudo ln -s /usr/local/etc/ssl /etc/ssl
sudo addgroup docker
sudo addgroup tc docker
8. Add these to /opt/.filetool.lst:
/etc/passwd
/etc/group
/etc/shadow
/etc/gshadow
/usr/local/etc/ssh
/etc/docker/daemon.json
9. Use filetool.sh to backup the paths in .filetool.lst:
filetool.sh -b
10. Add this to /opt/bootlocal.sh or /opt/bootsync.sh:
modprobe btrfs
mkdir -p /var/lib/docker
mount <partition with your new btrfs volume> /var/lib/docker
export DOCKER_RAMDISK=true
ulimit -Hn 65535
ulimit -Sn 65535
/path/to/your/cgroupfs-mount
/path/to/your/dockerd >/home/tc/dockerd.log 2>&1 &
11. reboot and try docker run hello-world
:D
As a side-benefit, containers run faster than on Ubuntu because of missing dependencies that docker normally uses to throttle the containers.
(refs: I borrowed some code from the first two code blocks of @paulscode (http://www.paulscode.com/forum/index.php?topic=14951.0))
-
it is possible to run dockerd and docker containers in TC x86_64 10.x without either rebuilding the kernel or building a tiny core package.
...
As a side-benefit, containers run faster than on Ubuntu because of missing dependencies that docker normally uses to throttle the containers.
8)
conversely i just happened to have found this https://hub.docker.com/r/tatsushid/tinycore/ "tcl Docker Image" page