Skip to content
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

Merged
merged 8 commits into from
Mar 4, 2022

Conversation

milas
Copy link
Contributor

@milas milas commented Feb 23, 2022

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.

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.
@milas milas self-assigned this Feb 23, 2022
Base automatically changed from milas/blog/rancher-desktop-revamp to master February 24, 2022 14:07
Copy link
Member

@nicks nicks left a 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
Copy link
Member

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][])
Copy link
Member

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.

Copy link
Contributor Author

@milas milas Feb 28, 2022

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!
Copy link
Member

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.

Copy link

@lianmakesthings lianmakesthings left a 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).

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?

@milas
Copy link
Contributor Author

milas commented Feb 28, 2022

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 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 😭

@milas
Copy link
Contributor Author

milas commented Mar 2, 2022

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

@nicks
Copy link
Member

nicks commented Mar 2, 2022

let's publish today, bc we keep getting questions about this!

@milas milas merged commit 755e6d6 into master Mar 4, 2022
@milas milas deleted the milas/blog/rancher-desktop-runtimes branch March 4, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants