How To Replace Docker With nerdctl And Rancher Desktop

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
that's it i'm done with it i'm going to remove it for good forever docker desktop is probably the tool i've been using the most it's been on my computers for last 10 years or so i've been using it every single day and now came the time for me to remove it and replace it with something else there are quite a few reasons why would they do that why would they get rid of docker desktop to begin with i might need to pay for it or to be more precise the company i work in might need to pay for docker desktop and there is nothing wrong paying for software that you need for software that is strategic to your company unless there are better open source alternatives and there are i found the combination that works better at least in my case let me start by saying what i really really need i need a way to build container images to put into a registry and i need a local kubernetes cluster as far as kubernetes is concerned when running on my laptops and on my desktop computers it needs to be k3s it is my favorite kubernetes distribution at least when running locally because it's lightweight it is fast and it is generally speaking better than anything else that we might run on our laptops more importantly it is so much better than kubernetes baked into docker desktop which i haven't been using for a while now i've been using kind of k3d both of them running inside docker desktop with kubernetes that comes with it disabled but that always felt kind of weird why would i run gate 3d or kind inside of docker desktop that already has kubernetes baked in even though i can disable it and long story short there is a better alternative and that alternative is called the run-through desktop it is based on k3d it does what it needs to do it allows me to select specific kubernetes version that i want to run which is very important because i want to be as close to production as possible it is fast it has graphical user interface if i ever need it which i rarely do maybe for selecting kubernetes versions and so on and so forth and i already explored launcher desktop in one of the previous videos so check it out if you're not familiar with it i will not go into depth of what it is because hey that would be duplication of work there is a video go and watch the problem with rancher desktop at least the the time when i explored it is that it comes with kim or kubernetes image manager which does not really work as expected it is not a valid replacement of docker desktop so i found and i've been using for a while a real a good alternative to docker itself and that alternative is called nerd cattle or nerdy cattle [Music] the problem with nerdy cattle itself is that instructions at least official instructions are explaining how to set up lima virtual machine that will allow you to manage and run containers and build and push container images but it does not come with kubernetes so i never thought that that's a really good option because i would have to have two solutions one for kubernetes another one for building container images so i discarded the combination of using lima and nerdy cattle because it doesn't give me everything i need but then all of a sudden roger desktop changed the strategy and added nerdy cattle to its package so now we have two options we can use rancho desktop with kim or with nerdy cattle and nerdy cuttle is the real deal that's the one i want and that was the missing piece that prevented me from ditching docker desktop in the past if you combine the two if you combine rancho desktop and nerdy cuddle that comes now baked into rancher desktop we have everything or at least i have everything i need i have a local kubernetes cluster which is absolutely amazing and i have an equivalent of all or almost all docker commands i can run containers i can use docker compose i mean i do not use docker compose for long long time now but i understand that many people do anyways with nerdy cattle we have equivalent of all or almost all docker commands and if we combine it we run your desktop we have a complete solution we have container management image management and kubernetes cluster running locally and that is what we are going to explore right now we're going to go through the demo so you get a feeling of how it works and then we are going to talk about it and i'm going to tell you that i'm almost there because there is a secret here i did not remove it from all my computers i have three computers one desktop two laptops and i removed docker desktop in favor of rancher with nerdy cattle in two of them one is still running docker desktop and i'm going to explain why that is the case later on for now let's take a look at how it works and whether it is a worthwhile investment whether you should use it but before we go through the demo let me tell you a bit about nerd cattle and the history behind it it is a project within container deorganization that means that there is a strong relation with container d and that's a good thing because container d is the de facto standard for running containers it's not docker docker might be what you consider standard on your laptop but in kubernetes clusters in servers in general it is container d it's just that container d is a subset of what docker offers and it is probably the most important part of it in any case container d is the golden standard for running containers no matter whether you know it or you don't because more often than not it is hidden from you behind kubernetes api and then the team behind container d started a new project called nerdy cuttle and nerdy cattle has couple of important features the begin it is supposed to give us the same user interface and user experience as docker it's supposed to fully support docker compose so those two features are more about making the transition to nerdy cattle seamless to make it compatible with docker and then on top of those there are a couple of very important ones which might not seem so important but they actually really are it supports ruthless mode meaning that it does not have to be a root user to do whatever it needs to do and that means as a result that it is much more secure infinitely more secure than docker it allows lazy pulling of images which means that it can stand running containers before all the layers of an image are pulled which in turn should speed up everything and finally it supports oci crypt which enables support for encrypted images and there are quite a few other things but i'm already getting nervous i want to jump into the demo so let's see it in action and then we're going to talk more about it it all starts with rancho desktop i already installed it and you should install it as well if you don't not have it already if you don't know what i'm talking about check the video about rancho desktop this is not a deep dive into launch desktop i'm interested in a combination with nerdy cattle and what really really really matters here is that you have to have launcher desktop at least version 05 that's the release when the project the community added the support for nerdy cuttle so go to kubernetes settings scroll to the bottom and you will see a couple of check boxes that allow you to install certain tools like cube cattle helm and a few others but what matters for this context is that you have to check the box nerdy cattle unless you already have it installed and then run your desktop will install it for you now that i have nerdy cattle let's take a look at the cli and see what are the options what are the sub commands that we can use those commands will be familiar we have run exact ps logs port stop start et cetera et cetera et cetera those are the same as docker commands those are equivalents to docker run docker exec or ps and so on and so forth and the good news is that it looks like all of the commands are there that might not be true and we are going to talk about it later but for now think of it as a full replacement for docker now since i have branched desktop up and running i have nerdy cattle installed i can start using it right away i can execute commands like nerdy catalyst near the cattle that however if you're used to docker as i am you might have developed muscle memory and your fingers might be typing without thinking commands like docker image this docker image that and docker container this and docker container that so the first thing that i will do and i recommend you to do as well is to create an elias and say elias docker equals nerdy cuddle that way you can continue typing docker commands even though you will not be running docker you will be running nerdy cattle that will communicate with container d running in rancho desktop to make that change permanent to make data layers permanent you should probably add it to bash rc or cshrc or whichever shell you are using and from now on i can keep executing docker commands even though i deleted docker from my system there is no docker on this machine so i will execute docker help to show you two things first of all if you take a look at the usage section we can see that it says nerdy cuttle and that's a confirmation that i'm not running docker anymore i do not have docker cli i do not have docker desktop this is nerdy cattle pretending to be docker and the second important thing is that you can see the list of commands that i already showed you when executed near the cattle those are all the same docker commands that you are all used to so now we are ready we have docker without docker so let me do some basics and check whether this really works as expected can i for example list container images by executing docker container ls and of course i can i mean the output is empty because i'm not running any containers but the point is still the same i can execute the command and if i would have any containers running there as i soon will i would see the list of those containers in exactly the same format as docker would list the containers i can run containers as well with something like docker container run and then let's say dash dash rm to remove it once it's finished doing whatever it will be doing dash id to get interactive and terminal mode and i will run alpine and i will output some message with echo like hey is it working and you can see from the output that it did two things it downloaded all the layers of the alpine image which is what you would expect and it output the message is it working so docker container or nerdy cattle container sub commands are working i'm not going to go through more of them you just need to trust me i've been using this for a long time it all works but how about docker compose can we do docker composition that let me execute something like docker compose app and maybe i should do a detached mode and i already have docker compose in this repo so i do not need to specify the location of the file i forgot the most important thing and not the most important but an important thing to tell you and that's that all the commands that i'm executing our energist and the address to the gs the url to the list is in the description of this video so go and check it out if you want to reproduce what i'm doing going back to docker compose we can see that it created two containers wordpress and database this is a silly demo of wordpress do not judge me for that i'm not using docker compose for many years now i'm doing this only because you might be using docker compose and if you're curious about why i'm not using docker compose just let me know and i will organize ask me anything session or maybe a session explaining why doctor compose is not a good idea actually i already did that a few weeks ago there is a video that among other things explains why docker compose is not a good idea and i just proved that i'm so old that i'm forgetting things that happened a couple of weeks ago anyways docker compose is obviously working it is doing whatever it's supposed to be doing and i can verify that that's really the case by listing all the containers and i can see that there are two containers mysql and wordpress so it is working it is pitch we can all live happily ever after and since i do not really need wordpress i'm not even sure why i use this as an example okay i do not use wordpress either in any case i do not need it i started it only to prove to you that docker components work and with great satisfaction i can prove it to you that i can shut it down as well by executing docker compose down and the last important and most commonly used feature of docker is to build and push and tag and generally speaking manage container images so let me check whether that works as well so let me run docker image build and i'm going to target as devops toolkit and i'm going to specify the current directory as the context which is dot in linux and then it needs a couple of moments to build all the layers and that's about it docker image build works as expected even though i do not have docker anymore and i should be able to push that image somewhere for simplicity i will use docker hub but it could be anything else and before i push anything anywhere i should log into the registry that i'm using and the command just like anything else is the same as in docker itself so i can run something like docker login and then pass the username and pass the password and that's about it i'm logged in and i can push the image to my registry i can tag my images with specific releases and i can list my images and i can do anything else that i might need to do using docker cli and docker itself running in a vm which is docker desktop but in this case i'm using launcher desktop as my vm that already has k3s kubernetes distribution which uses container d as most of the other kubernetes distributions are using and now i can even build and manage and run containers through container d instead of docker which is deprecated from all kubernetes distributions except docker desktop so effectively what i'm doing here is going down the right route by using kubernetes which is powered by container d instead of deprecated stuff and now i'm done and the only thing left for me is to prune the system from all the stuff that i was doing i love docker system prong command because it allows me to quickly wipe the whole system so let me prune the system by executing docker system prone and it's not working this is the first and potentially the only thing missing the only thing that prevents me from saying that nerdy cuttle has hundred percent compatibility with docker cli and quite a few other features on top but hopefully that's not such a big deal i mean i use docker system prone often but i can probably lift it up actually i will have to live without it because i removed docker from my system so that's it so let's talk about nerdy cattle as a potential replacement for docker cli and the combination with rancher desktop which is a potential replacement for docker desktop let's start with pros what are the advantages what are the good things why should you use nerdy cuttle combined with rancher desk to begin with nerdy cattle is a full complete replacement for docker cli except the docker system prune so what i said is actually not true is not a complete replacement it is almost complete replacement we can use it to run containers directly you know docker container run or near the catalog container run commands or we can run containers through docker compose if that's what you prefer even though you shouldn't you shouldn't use local compose but i will let it slide for now we have kubernetes and not just any kubernetes we have potentially best local kubernetes distribution which is rancher desktop and i'm saying the best because it is based on k3s justice k3d is based on k3s but on top of that it has graphical user interface it allows us to choose kubernetes version we want to use it is lightweight it is fast it doesn't occupy much memory in cpu it is absolutely awesome and finally it works or almost works or it will soon work on apple silicon so if you're using apple silicon like m1 m1 max m1 pro or whatever apple is naming their silicon chips launcher desktop might be one of the only options you have mini cube alone does not work on apple silicon podman doesn't work on apple silicon or at least i think it doesn't work the only solution that you have for apple silicon is either docker desktop or rancher desktop to be more precise rancher desktop is powered by lima and lima ken theoretically maybe one day we do not know work with apple silicon so that's a huge advantage it works on intel chips and it might work one day i will talk about it later on apple silicon it works on windows and it works on linux even though the support and stability on different operating systems is not on the same level because after all lima and ranch desktop that is using lima are relatively young projects now let's talk about disadvantages actually there are no disadvantages except if you're using apple silicon it does not work completely there are bugs there are issues it's almost there but not there yet at least not at the time of this recording which is october 2021. so that's the biggest disadvantage and that's why i removed it from two out of three computers that i own two of them are based on intel chips and one is a brand new shiny macbook pro and i'm having a lot of troubles over there and i'm still using docker desktop but as soon as those bugs are fixed docker desktop is going out of that computer as well and then i will be completely docker desktop free and using exclusively run your desktop with nerdy cattle you
Info
Channel: DevOps Toolkit
Views: 50,145
Rating: undefined out of 5
Keywords: devops, devops toolkit, review, tutorial, viktor farcic, docker desktop, rancher desktop vs docker desktop, docker desktop mac, docker desktop kubernetes, docker desktop mac m1, nerdctl, rancher desktop, docker, docker replacement, docker desktop replacement, docker alternative, docker alternatives, docker desktop alternative, nerdctl lima, nerdctl vs kim, nerdctl system prune, nerdctl k3s, docker compose, docker cli
Id: evWPib0iNgY
Channel Id: undefined
Length: 18min 50sec (1130 seconds)
Published: Mon Nov 01 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.