Best way to run vanilla Docker?

Jip-Hop

Contributor
Joined
Apr 13, 2021
Messages
118
I currently have a working POC of Docker in LXC container on TrueNAS SCALE using only the tools/packages pre-installed. Not depending on systemd-container (which is a sub-dependency of a package installed on SCALE), but instead using virsh from the libvirt-daemon-system package (which is a direct dependency of SCALE and the API is responsible for the VM features in the GUI). The post is in the Openmediavault forum but it works on SCALE as well. I'm going to experiment with using crun or runc as well to create an isolated environment in which to run Docker on SCALE :)
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I like where you're going with all that.

Some iX support would be great to give folks the confidence to use it knowing that it won't be blocked or removed later.
 

Jip-Hop

Contributor
Joined
Apr 13, 2021
Messages
118
Well then here it is: ubernerd. POC of running nerdctl (which is mostly docker compatible and has some neat additional features) natively without modifying the host rootfs and without relying on the package manager. It may be able to replace docker, lxc, systemd-nspawn (jailmaker) in many cases. Tested on TrueNAS-SCALE-23.10-MASTER-20230816-040941.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Just a couple of questions
1. What do you mean by "mostly docker compatible"? NVM - I think I found it
2. If I have a current jailmaker setup - is there any known issue running the two side by side (for a testing duration)?

Well done BTW
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Even a bonus question... can I just take a jailmaker jail directory and use that with ubernerd?
 

Jip-Hop

Contributor
Joined
Apr 13, 2021
Messages
118
Even a bonus question... can I just take a jailmaker jail directory and use that with ubernerd?
Probably! Just make sure the jailmaker jail is shutdown (don't run multiple containers/jails off of the same rootfs simultaneously). And I'd advise to make a backup/copy/snapshot before you run the same rootfs with nerdctl. You may have to experiment a bit depending on your networking config.
 

Jip-Hop

Contributor
Joined
Apr 13, 2021
Messages
118
Just a couple of questions
1. What do you mean by "mostly docker compatible"? NVM - I think I found it
2. If I have a current jailmaker setup - is there any known issue running the two side by side (for a testing duration)?

Well done BTW
You should be able to run them side by side.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You may have to experiment a bit depending on your networking config.
I can't begin to say how grateful I am to you for bringing this work forward...

I was able to install ubernerd in less than a minute... changed to the jailmaker/jails directory for one of my jails and ran the nerdctl command to start it... then realised I hadn't specified host networking and volume mounts, so had to stop it, remove it and run it again with those switches, then all was running exactly as it had been in jailmaker. It even got me to a solution I was looking for to expose the needed hardware for smartctl (running in privileged mode) to see the disks on the host (couldn't get there with jailmaker). (side note: doing that will kill the smartd service on the host, so make sure to account for that)

What a brilliant solution to this whole situation... seems more-or-less bulletproof and portable as a massive bonus to just about any Linux OS... maybe also some others.

@Jip-Hop you are a genius!
 
Last edited:

Jip-Hop

Contributor
Joined
Apr 13, 2021
Messages
118
Glad to hear positive reactions! It's still very much a POC and not complete. Any help is welcome (search for TODO in the repo)! For now my home server will continue to run jailmaker but I think ubernerd has the potential to fulfill most container needs :D
 

Glowtape

Dabbler
Joined
Apr 8, 2017
Messages
45
Neat, the script works nice. Thanks for that one.

I suppose using host networking isn't problematic?

Bind mounting my ZFS dataset into the nerdctl container to bind mount it again into a docker container feels a bit Rube Goldberg, but I guess it is what it is.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I run Mailcow, which doesn't have any other supported option than docker compose.

Me too. Will be porting my mailcow installation to its own sandbox once Dragonfish releases... for now its happy running in a dedicated VM

And mailcow is the primary reason I did NOT switch to scale until a good compose solution was found.
 
Top