The Lima container drivers #3829
afbjorklund
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently we have one such Lima driver, namely WSL2 for Windows.
And one under construction, the new Apple Container (AC) for macOS:
But it is also possible to run original Docker Containers (DC) on Linux:
runc is the default OCI runtime (no VM)
--runtime runc
runv is now: Kata containers (KVM)
--runtime runv
--runtime io.containerd.kata.v2
runq where the Q is for QEMU (KVM)
--runtime runq
The three drivers are very similar,
wsl.exe
vscontainer
vsdocker
These drivers don't run with a regular cloud image, but instead they use a rootfs in a tarball (without kernel or initrd).
The kernel is either shared (like with WSL2 and DC/runc), or one kernel per container (like with AC and DC/runv)
On top of the base OCI image, we need to add some programs (like
sudo
) and some servers (likesshd
).To manage the processes and services, we need an
init
and a supervisor - such as systemd or OpenRC.Normally we would also need
cloud-init
, but Lima comes with some shell scripts to create the basics (lima-init
)Another big difference is that the process (eg "pid file") and disk images can be stored outside of the instance directory...
Currently we don't want to pull images or artifacts from an OCI registry.
The images are smaller:
Apple
Docker
And the boot time is faster.
Typically boots in a second for a MicroVM, or half a second for containers.
Compared to something like 10 seconds, for the regular images and VMs.
We import the rootfs tarball into a container image, and then we create a container from the image.
The initial boot script is run through exec, but after that we can connect with ssh as with a normal VM.
Beta Was this translation helpful? Give feedback.
All reactions