-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blog: Rancher Desktop container runtime comparison #1070
Conversation
Update based on ecosystem changes since originally published in Sept 2021. (If you're keeping score, Nick predicted this right away.) The original post, which is focused on the now inactive `kim` builder experiment that shipped with early versions of Rancher Desktop is now moved to a "new" (but backdated) post for posterity, as it's not a bad example of writing a `custom_build` extension. It also links to the "Switch to Rancher Desktop" post for any Rancher Desktop users that stumble upon it, as it's now no longer relevant for them. The new post is pretty short and sweet because there's not a ton to do! But it lives at the old slug (SEO yay) and _really_ fulfills its promise of a 5 minute swap :) See also tilt-dev/tilt#5513, which adds the in-cluster detection support, so is required for this to work as expected.
Follow up to #1067. This is a new post that talks about both containerd + dockerd (moby) modes of Rancher Desktop and how to use each of them with Tilt. For containerd, we point people to the `nerdctl_build` extension. For dockerd, we point people to the (revamped) "Switch from Docker Desktop to Rancher Desktop in 5 Minutes" post.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would probably trust @lianmakesthings 's comments on this more than mine. I feel like the dev advocate community has really struggled in general in how to explain containerd vs docker, and it's easy to get lost in a maze of how the architectures fit together.
``` | ||
|
||
So, why are some reasons we would opt to use [containerd][] with Rancher Desktop? | ||
* You're using containerd in prod and want your dev environment to mirror that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
containerd
is a smaller, faster, more secure container runtime
The trade-off is that dockerd
has a lot of historical baggage, and wants to maintain backwards compatibility where it can. Some of that backwards compatibility is good and useful and you may have tools that depend on it!
|
||
So, why are some reasons we would opt to use [containerd][] with Rancher Desktop? | ||
* You're using containerd in prod and want your dev environment to mirror that | ||
* [containerd][] and [nerdctl][] enable some features not possible with Docker (e.g. lazy-pulling with [stargz][]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure this is accurate? i'm not totally sure what the stargz/Docker status is right now, but I can't imagine there's any fundamental blocker? i think they're using a version of containerd that supports it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going off containerd/stargz-snapshotter#258, which probably deserves an in-post link here
My understanding is Docker (+ any other OCI compatible tool) can use an eStargz image, but the lazy aspect doesn't work with Docker OOTB, though it's technically possible to do some shenanigans with docker buildx
to configure a BuildKit context with the right flags etc
### containerd | ||
The default container runtime in Rancher Desktop is [containerd][]. | ||
|
||
These days, it's also the de facto standard container runtime used in production Kubernetes installs, so it's not surprising it's the default here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would probably link to this post, which i think does a good job of explaining WHY it's the standard
https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/
i think a lot of people get confused about the difference between docker the image builder and docker the container runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the write up!
These days, it's also the de facto standard container runtime used in production Kubernetes installs, so it's not surprising it's the default here! | ||
In fact, it's also used by [kind][] and in some [minikube][minikube-runtime] configurations among others. | ||
|
||
A popular option for building images with containerd is [nerdctl][] (a non-core subproject of containerd). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You say here "a popular option". Could you spare a sentence here to explain what other options are and why I might want to choose nerdctl over it?
So much this, I'd really only thought about this from the perspective of the different Tilt setups/configs when starting writing, and very much struggled through that aspect 😭 |
THANK YOU @lianmakesthings and @nicks for the feedback! I made some changes, which I think incorporates it and is much better IMO: ce03c3a I also changed the date to be tomorrow (Thu Mar 3) to keep the blog posts spaced out |
let's publish today, bc we keep getting questions about this! |
Follow up to #1067. This is a new post that talks about both
containerd + dockerd (moby) modes of Rancher Desktop and how to
use each of them with Tilt.
For containerd, we point people to the
nerdctl_build
extension.For dockerd, we point people to the (revamped) "Switch from Docker
Desktop to Rancher Desktop in 5 Minutes" post.