The Best Docker Setup for Devs in Windows 11 (Ep 204)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] thank you foreign [Music] [Music] [Music] thank you [Music] [Music] [Music] [Music] [Music] [Music] thank you [Music] thank you [Music] thank you [Music] foreign [Music] foreign [Music] my name is Brett this is my live show uh I have Deja Vu every week exactly at this time because I do the exact same thing I welcome you to the show you're here to ask questions and to learn something new uh mostly in devops and containers which is all I've been talking about for seven years um I was actually reflecting on the docker birthday that's about to hit next month we're gonna have 10-year Docker birthday next month it's gonna be pretty exciting we like round numbers as humans so I was just reflecting on what I was doing with Docker almost 10 years ago and uh wrote a little quote for Eric Smalling who may or may not be here today but Dr Captain Eric is got a newsletter and he's going to be he's he's gonna have some quotes from people that were using Docker in its early days and what it was like to be sort of on the on the On The Edge on the bleeding tip edge of container stuff so that's coming up next month uh we don't really have a plan but we should have a plan for Docker and then do v23 release the new Big Docker um Docker engine announcement and then also the docker birthday we should probably do something so stay tuned I'm excited to have Nunu on the on the show today before we bring him on I just want to mention a couple of things so if you haven't heard me talking everywhere about this this is my my new live course I will mention it every week up until the launch in a month we have four weeks now for you to still sign up this is this is a course meant to get you actually using the products in at least if not in your Dev and testing works but in production within two weeks this is not one of those video courses where I record hours of video and you watch it eventually and then you do something with it eventually this is meant to take the skills that you're learning about GitHub actions and get Ops which is Argo CD we're going to be focusing on Argo and GitHub actions those are the two tools we're going to use them together along with an array of other security build tools all sorts of stuff and we'll be doing that together in real time in Zoom basically together uh there's only going to be 15 people allowed in the course so we've now had multiple sign ups so I expect these to the seats to be filled before the last day it's on sale I'm going to throw that link in the chat anyway it's my first time trying this out I'm excited because we get to hang out together for about 90 minutes every other day for two weeks and we're gonna be implementing we are going to implement these tools on a test cluster and in your own test repos and then we have scheduled time for you to do this on your own projects while having access to all of us in video and we're basically going to be heads down together just working on our own projects but have the availability ability to actually ask when you hit a roadblock while you're doing your work so I've never done that before and I've done it with clients Consulting but not with a group so this is kind of like getting private consulting or small group consulting um but at the price of a course so check it out there there's all the details in that site uh the dates the times of day that it's going to happen what days are going to be there yes you get recordings and all the resources when this is going to happen this is a steep discount off it's hundreds of dollars off what the the next cohort will be this is sort of like the beta cohort so you get to learn uh we'll probably spend some extra time like making sure that it's it's all good and everybody's getting what they need out of it and uh so since it is the first group I'm going to give you a nice little discount for taking a chance on me but it starts in March on March 20th um and I can't wait to get started so enough about that did you know I have a newsletter we have rebooted the newsletter this year um you can check that out over here and when we just launched week six of that so it's a short newsletter but it's focused on what I'm creating maybe one or two important things I've seen elsewhere it's not an industry newsletter I think we have plenty of those from great people devopsish from Chris if you look up devops-ish that's a great uh newsletter and there's others out there but um yeah so it's a short newsletter what I'm creating what's going on conversations I I see people having people that are basically creating these tools what conversations do they had having and maybe some reminders of old stuff that's happened like this old uh blog post from two years ago which I think is still an excellent way to learn the difference between doctor and kubernetes also there is a sale on the loot box my merch store so look look below look at the description and there's a 15 off sale going on right now on all our t-shirts I am wearing one of my favorite t-shirts fix something every day basically that's the that's the chant I tell myself every morning when I get up and you can get yourself a mug and other things as well like this all right enough about that let's get to the show welcome to the show uh Nuno dicarmo who is a Docker Captain a technical writer for suse he he you were you were at Rancher right hello hi everyone hi Brett thank you for having me and yes I'm a tech writer at zuza to spell it correctly even though it's weird for me not being an English speaker but yeah zuza uh Rancher so Adventure by Isuzu yeah however you want to say it right yeah so for those of you that haven't noticed in the last couple years Rancher was was purchased or part or whatever we want to call that word we acquired uh by Susa or susei depending on where you are or how you say it um someone someone will correct me in chat because uh years ago someone corrected me on Ubuntu because I was saying Ubuntu and someone was like there's no it's Ubuntu um so anytime I say something wrong in Tech if there's a correct way of doing it I just realized I have my yeah so it's okay Susan okay sure about the yeah and and since it's been around a while like um they're they're one of the major Enterprise uh Linux distros that I see out there in the wild when I'm especially when I'm working with European countries uh or companies that are in Europe they they prefer that and so it's a it's an interesting partnership and I've always been huge fans of Rancher and now you now you you have the insights on the on what's going on there so we won't we won't talk about ton about rancher today but we are going to talk about rancher desktop where um if you haven't seen Nuno on the show before uh he's basically like I'm the Mac guy he's the windows guy like he knows so much WSL like day-to-day development on windows so if you have questions about being a developer an operator a devops engineer any of those roles on Windows today um let's let's ask him all the hard questions let's go yeah and uh I mean really a lot of this starts with um WSL I feel like it's hard to even talk about developing on Windows today without WSL like it hasn't been around that long but and we've we've talked about it a dozen times on this show we've probably had a dozen episodes dedicated to WSL uh which is good yeah I mean there's a lot to talk about I mean if we go back in history right we had wso well I guess we're calling it wso one now yeah yeah and that was a really good start and it had limits but it met a lot of needs we were able to use it and then W but Docker couldn't necessarily use it but um then wsl2 showed up and everything changed and now oh yeah it's it it's sad for me on Mac because I went to Mac because it was more unix-like like over a decade ago right I was on Windows back in the windows seven days and I thought man this Mac you know with this BSD based kernel I'm gonna go over there that's where all the developers seem to be and now it turns out that Windows is actually a better place to be yeah I mean thanks to WSL we will enter just a little bit uh like you said we need to understand first what is WSL and how it enabled Microsoft Windows to finally be really on par with uh with Mac nowadays um if not superior but I'll let you decide um but uh yeah WSL one like you said was like a translation layer so we did its limits I won't enter too much uh we talked about in length I think the the past episode already but uh very shortly it's like a translation layer so at some point in time uh you will met like roadblocks that are walls actually and you cannot just uh overcome them so during that time uh Microsoft was working on uh Linux containers on Windows actually elcal for the ones who remember them and that was using uh technology of sort of micro VM so it's hyper-v VMS but like Atlas um and the technology was so good developed and was really working fine that they brought like the ID of making like a the trying to have like a Windows sorry a Linux user lens fully on on Windows and this time with the VM so the moment you reach a VM so there's still potentially some limitations at least some performances uh that are let's say impactful for uh quite some people uh I will tell the truth nothing is perfect right um but WSL 2 brought this like user lens and uh Linux really VM feeling two windows that's really what wsl2 did and from there like the solutions that are based now on wsl2 and the solutions that we can Implement directly on it also uh are just going growing day by day really yeah I mean it's to the point I think so when we we met on the show we were talking earlier like a year and a half ago I think yeah I think Windows 11 was relatively new and we were talking about some of the new things like the you know GUI basically Linux gui's on Windows and stuff like that that just honestly was blowing my mind and still does um about the the ability for you to transcend the OS barrier with guise is is really cool stuff um and I you know there's there are still people out there that are using hyper-v mode or uh they're they're using vagrant VMS and um not not to like preach or be you know bang the table soapbox moment but um if there's something about I would love to hear from people that like there's if there's a reason that they've tried to adopt wsl2 somehow didn't wasn't able to use it and they're still using sort of full VM uh so I would consider sort of Legacy virtualization on Windows desktop I would love to hear from those people I don't know if we have any of those people here uh RJ actually has a great question for you uh what are the limits or Max capabilities of Linux running in wso what is the major difference of using it in a VM box versus WSL um again it's uh micro okay so it's a micro VM integrated in Windows uh these means that you will have networking non-capabilities I'll turn it the other way uh from the hyper-v network and right now they are trying to fix things there um also the cross let's say the cross file system it's good but it's slow as we speak like if I try to write from WSL on Windows File system I can but it will be slow like if you just do like a git clone it will take you potentially if your repo is big like ages literally yeah um so the advantages of a VM nowadays uh it's really isolated one sorry I do the pinky um so uh it's fully isolated second the kernel uh mechanics are different with double cell and um a VM this means that if I want to load and that's my case and actually one of my later blogs I explained that but it's like if you want to load modules on Linux nowadays you dynamically load them that's it okay in the VM you just load your modules you mod probe whatever and it's it's there with WSL the kernel resides outside kind of the VM so the VM loads it but it loads it in a way that if you want modules inside your WSL instance you need to compiled a kernel so I've been there like my all my Linux friends that know that I'm Windows guy yeah they never thought that I will tell them I'm compiling a kernel once a month let's say or something like that for tests they're just laughing at me seriously but that's that's that's that's the way currently yeah we're just jealous because you know Windows and Mac people can't compile their kernels so yeah exactly I feel so sorry for you yeah like having time not waiting on a kernel that is building for ten hey look I mean 20 years ago it was the only way I could ever make Linux work or FreeBSD or anything so it's just amazing now that we have this these options that we don't have to compile so it's pretty great yeah um anyway so that that's the these these mechanism of really the kernel Behavior or how you interact with the kernel but once you know that well a VM will take ram more than WSL because again it's a micro VM and it's kind of like loading inside the ram that you have and still you can like put limits which is good like initially you didn't have any limits they so that it was not a good idea very fast so now there's limits the CPUs you are using all the CPUs available also because it's again low code loading with your windows kernel so you are like leveraging your material and of course now there's the GPU so it's you don't see like the GPU per se so if you do like a a list uh lspci sorry uh you will not see your Nvidia or your AMD card however if you run like Nvidia SMI that checks like for the workloads and what's a it's it's available it will show you that you have that that you have like Nvidia working behind the scenes and when DDI is working with Microsoft with the drivers and everything right so there's a magic there to to accommodate for the the WSL no I hate to use the word emulation because it maybe isn't the right word but the um yeah I I see that like I kind of passed through but for just the workload so you send your workload your AI workload your ml workload because that's the goal here right and you send it and uh it normally uh takes it on your GPU but that's that's really like uh what do you prefer like if you need isolation go for a VM like full isolation go for a VM if you want to be like quick and you want interoperability between the two systems between the two user lens right windows and Linux go for wsl2 yeah and we're getting some good questions uh um yeah RJ's talking in nadir I see your questions we'll get to those in a minute um I think like one of the things that we all had right like when we were all running VMS and we were running Linux VMS and stuff inside of our whether it was vagrant via virtualbox or VMware VMware Workstation or whatever um we all had our habits and you know some of us like I knew a team that you know up until just recently was still deploying a vagrant VM to their Windows developers and they would do all development inside the VM file system so when we start talking about file systems you know it is a little tricky because now what we're talking about is you have your host file system you have your VM file system and then you have the file system in your container so there's all these like infinite layers down with the turtles all the way down or whatever um and the in their case they they essentially were using special Ides or ways for the IDE to get into the VM so that they were working in the file system of the VM but it was like if they had a file on their host and they wanted to get it in there it was it was arduous right it was complicated it was confusing to figure out okay what directory I need to put it in so that I can then see it and then I need to move it from inside the thing and we as you mentioned earlier like any time you have hosts anytime you have files on one file system and your bind mounting or network sharing or socket sharing or however the files are actually getting into the other OS if you're if you're sharing these files across out west there's always a huge hit in performance I have students that you know they never noticed this because maybe they have small projects they're doing bind mounts maybe they're doing bind mounts from the Windows File system into the Linux VM for WSL or they're on Mac like me and they're and that's all we have we can bind Mount our source code from our host machine into the container and there's always a performance penalty there but not everyone sees it I would say honestly probably 10 only 10 or 20 percent so see that such a huge performance hit that they're like okay I need to fix this problem and that usually leads them down the road of oh I need to probably start putting my code in this VM that I'm running right like whether it's the the VM workstation via you know Os or it's wsl2 so this kind of leads me to like the PSA or the the soapbox moment for you of like let's make sure that we're setting up ourselves if we're using WSL to yeah let's set ourselves up for success and how do you do that right so uh yeah I can show you maybe it will be like I can talk and type all right everyone can see my screen beautiful yeah okay so um yeah so I opened a file here I will be speaking about like uh quickly about the configurations um but the first thing is like from here I'm on uh Windows Powershell and I will talk a little bit about my my customization here uh let's take uh Tumbleweed for now all right so when I'm in tumbleweeds okay I'm in my own uh like my Linux ohm now when I'm on Powershell you can see here that I'm um I'm on my home on Windows but it means that this pass here actually I can from um from WSL I can go there okay and I can list my files so it's it's a fresh VM I don't have anything to hide here um let me go directly to I don't know like documents for example okay so I don't have much there so now let me for example create uh first with vi just a test okay I create a test uh hello all happy to be here okay and the Magic The Magic here I know how to quit Vim so that was just my Showcase of the skills today I I I'm good now we're done well and just to remind people I guess you're just now joining what were what one of the things you're showing here is that you're inside okay so first off you're using Windows terminal right yes indeed okay so our my favorite terminal I don't know about you Windows terminal is fantastic get it on the Windows store you can download it from GitHub it's from Microsoft it should replace all other gui's all terminal guis the old Powershell GUI we basically had this old thing that's been around for 20 years in Windows and windows terminal especially in Windows 11 because I think it I think it now ships the windows 11 right um yeah but okay it will launch also like terminal yeah because I don't have oh yeah okay yeah Windows 11 is a little more aggressive at guiding you towards the windows terminal future yeah you can set up but yeah so yeah I was uh I I was in WSL so I launched a distro that I have I have many I will show you but I have many digital so I picked one Tumbleweed in this case and I wrote thanks to VI here I wrote um a text into a file okay now this file from the Explorer here I can go and you will see if I open it with Notepads for example just once for now I can see here is my text okay [Applause] so and it's good it's nice it's just a text like I said so you don't see any anything that is like cumbersome it's actually pretty useful uh but again one thing that you said it was like how to start well with WSL and on Windows and the major issue that people do for example is to um to use WSL to write their projects or to use WSL and their project file system their project directories are on the Windows side so like I said do you have a git uh By Heart Like a repo that is medium size oh yeah get clone yeah sorry um yeah GitHub Brett Fisher b-r-e-t-f-i-s-h-e-r slash HTT no C no C in Fisher sorry yeah it's okay and then um HTTP EnV just like that yeah EnV yeah HTTP Envy yeah yep all right so let's put this like a Time oh yeah of course uh okay yeah so uh you set up a fresh new WSL yeah yeah so let me go somewhere else so by the way I don't know if you all just saw what he did but Windows terminal another Advantage is that um we're gonna get some of these quick facts out of the way so wso it's not installed with Windows by default but you can enable it uh I think there was a question about security I personally don't have any I mean I've worked with security teams security companies they're all using wsl2 that is their default modus operandi or apparenti or however you pronounce that uh the the Latin of the um basically that's how they get things done so I personally as someone who works in devsecops I don't have concerns about WSL because it is very locked down and minimal it is not necessarily uh a isolated VM in the case that you can make a truly isolated VMware Workstation thing where it's literally just like there is no shared file system there is no shared memory it is dedicated but I consider it an extension of your Windows File system an extension of your Windows host so you can install it through the store and you can choose your distributions you can have multiple distributions and I'm a little fuzzy on the details of how you would like share files between those distros because don't they like all they all have their own file system mounts right so they if you had one or the like if you had an Ubuntu yes but they do have one in common uh good question so yeah we cannot really see but I think we can already think like this is less than one second this is two seconds the same git clone on the two different um file systems one on Windows and one local right the local one is uh is a vhdx actually so it's uh it's a hyper-v uh and that's why it's it's quite fast uh when you work there so your point was that the tooling now before was really complicated but nowadays the tooling is quite good so let me go back here and one of the tooling a stupid thing is like uh I can call not pads dot exe so that's important okay so you don't need to you I press Tab and he provided notepad and I will be writing now like uh Linux file directly on my uh now this time on my WSL instance okay and here it says like okay your file doesn't exist he wants to put the txt because it's notepad and I will say okay uh hello from notepads on wsl2 and I will save it okay and now we have a problem here you can see that it's created with uh I think I can do this with the windows the windows line that was yeah sorry that was not what I wanted come back come back it was not Windows M come on okay I'll just use this one then it's okay and uh let me Zoom so here you can see yeah the oh it's Windows plus not M I'm stupid okay I'm good now so the thing is like it created like that so it can cause issues for the ones who already work with uh Windows files created on Windows and uh with the issue of having now if you read it I don't think uh we can but if I do a yeah you will not see it but like if there's special characters here the the the return will be like carrots a Big M for example so it will be some character that he doesn't know so the thing is like uh if I do like Linux file or touch even let's see Touch Linux file 2. and now I call notepad again on this Linux file to no okay so it doesn't work like I I like but we can do the same yeah so probably if you created a file in VI yeah and then open that notepad and what we're really explaining here is that um well a couple of things people are noticing like RJ noticed okay so windows executables are accessible from this Linux shell and what's interesting is that if someone goes back in time um we we actually had like 20 years ago uh I don't know if it was Eric or who I was talking with maybe we were talking at uh civo navigate down in Florida we were talking about how we had uh um actually it might have been Matt Williams that was a part of that stuff but we had windows it was something like it was called the Linux subsystem for Windows or something like that and it was actually Linux tools built as Windows binaries and again you were able to use a posix-like shell environment like bash or whatever inside of Windows server but it was a really weird environment because it was a Windows File system it was in TFS so you were get you weren't seeing it was pretending to be in Linux but it wasn't it was still running Windows binaries on a Windows kernel and this is totally different this is I get to do both I get to run my I can run executables from here and it essentially passes them over to Windows execution or if I run Linux built binaries like a curl or something um it's going to run it on the Linux kernel and it just kind of all works I think that's one of the the points of why WSL exists is that it's more than just a VM with a Linux kernel that you can get a shell into yeah totally and it's not yeah so sorry uh I'm I I switched this rules also and I didn't configure Ubuntu but yeah anyway so here you can see that's now not even notepad is aware of the the line endings and can be like the Linux identity uh Unix line ending and if you've ever worked in a team that had non-windows developers like this was a problem on day one right like someone someone on a Mac or on a wind on a Linux desktop would create a file in the repo and then someone on Windows uh it would look different to them in their editor and then they would save a new file and then it would really be messed up for the Mac people so luckily we have the get we have a git config file that we can all sort of set forget to to manage lined endings for us or use an editor config if anyone doesn't know about that editor config.org I think is also another great way to manage that um that's a great point though because it really is Linux and it really is Linux tools so exactly so before we talk about containers because we are here for that right um two things um so the tooling what we were saying so before you will maybe do a SSH if your tool will permit you to uh to create like the SSH to a remote server and try to connect there right from there directly uh you have limitations uh most of the time so now the tooling like Visual Studio codes and not only uh like go uh jetbrains the Suites jetbrains uh go lands and um the Java one the bigger one uh Jet Jet brains oh yeah yeah brains yeah but yeah their their Flagship editor it can connect directly to WSL so it's Double SL aware so quickly one one more thing maybe so I can explain why it's aware um I can show you yeah that's a good point like you're saying all the edit all the major editors support yeah the WSL environment because ideally you want your editor I mean what we're really saying here is you want your editor oops wrong screen uh you want your editors ideally to be Windows editors so you get that full windows GUI experience and the richness of that but you probably want your code to be in WSL on that file system somebody just made I had a question earlier I just want to get it out because I think it's a good segue right here someone was asking essentially what about the file system and how does it look yeah it was AJ and uh like you said this is all sitting in a vhdx is that right which is exactly which is if you didn't know this if you ran a server Farm a Windows servers like vdi vhdx and before we had just vhd files this is essentially what all virtual machines on servers and production are all using it's a very performant file system storage in a file and you can mount it on Windows even in a server manager or any of the some of the other the disk manager GUI you can actually Mount these files as real file systems in Windows there's a even a thing where you can boot to one uh without there's a lot of cool stuff you can do with them but it's this is a standard file format it is all just encapsulated essentially so you don't have some sort of weird proprietary proprietary um environment it's not literally creating another partition on your hard drive right exactly it's on your Windows host this all just looks like a a single file but when you get into Linux in the WSL it's it's all there so yeah so here uh I'm going to the inverse sway this time so from Explorer uh I don't know if you saw like you have now like Windows 11 at least and Windows 10 I think they they brought it also you will have these menu Linux here uh that will appear and then it will showcase all the distros and here that's important to mention that it's not all the distros that are seen by um uh terminal by uh the windows terminal that's all the distros that are seen by WSL and I will show you the the difference um and here so I could go to Ubuntu and to their own my own and then I could open again the file that I I created before with notepad yeah that's way more convenient than before there's these two ways uh going back and forth and uh let's I will try to put some expert tips then um here if you click on the on the bar that's really important you can actually call anything from here from WSL localhost so if I go back to my shell but this time Powershell I can actually surround the house yeah my double cell localhost and I will call Ubuntu and then now you can see that okay it loads I guess like a module yeah the file system module and now you can see that I'm inside Ubuntu and if I go to home so it's funny because I'm doing Tab and it's giving me like the the normal backslashes from Windows but I'm really inside uh Linux um file system so yeah like at some point in time you have to be really careful because you can get lost very fast yeah uh with the tooling but uh like the goal is this one like we are doing ourselves it's kind of Double SL the hard way the WSL the simple double cell the it's like you run for example your codes I have insiders here and I can run codes on the httpn for example and now notice yeah yeah so here it's aware that I'm running it like that but it's not perfect okay so okay it wants to download git and everything so like I said it's a fresh VM but it's not really perfect that's not really the way that I want to access even though I can right it's cool but the thing is like uh I'm writing from a Windows perspective so uh from a Windows point of view what I really want is that my tooling connects and will run directly so here look uh I I'm pressing the control carrots uh or uh backtick sorry and here you can see that I'm running Powershell but I'm I'm I want to I I mean I I started it from WSL so I want to be on WSL so gladly for us they created and they it's Microsoft they created some plugins add-ons and here I can run my WSL add-on that was not installed so I can install it now it's done and we recommend to use a double cell window exactly so now I can reopen my folder but in WSL mode and please look here uh let me Zoom again here that's the connection of like you like you can read like uh open remote window so uh from there let me close everything again because the pop-up disappeared and let me run it again and now look what it does it installs like the vs code server so the back end is now running on Double SL and my front end is the front end that I know and again look here is no more backslash backslash whatever no now I am in the mindset of WSL of Linux so I'm working like if I was working on Linux and if I open again the the shell now I have my shell now I feel like I'm really working in a singular mode I don't have to to think about paths completions shells or whatever no I'm on WSL my tooling my UI is Windows but my backend is connected to a backend running on WSL and yeah you can even see it there yeah you can even see which which VM or which uh WSL instance you're in yeah this is super great too because this I think this is a common struggling point for people that are getting into Docker as a way surprisingly a number of people take my course on Docker and they're new to vs code they're also new to WSL so there's a whole lot of learning all at the same time right and one of the challenges is all this stuff works so well together but if you Veer outside of this ideal solution let's call it um it can get a little weird a little funky and a little confusing yes so in general if you're coming from Windows 7 if you're coming from the older setups and you're now on Windows 10 Windows 11 you're enabling wsl2 you've maybe downloaded Ubuntu or open suse um you've done you've done one of those things and now you have this in the installed Windows terminal if you're on Windows 10 if Windows 11 I think it's already there but Windows terminal is that GUI uh it's going to show you automatically your WSL options which different distros you've installed you're going and then when you first run that it's going to ask you for a username and password because that's the real that's going to be your Linux account because it's a real Linux account on a real Linux kernel but there's no SSH involved there's no necessary you don't you don't need to bridge the file systems or run Powershell on your local machine and then like you're showing all the cool stuff like you can do that but really the ideal setup and this is what I I teach in my courses like you're saying is what we all want to get to is you open up WSL the shell Like A bash shell and Ubuntu again one of these different distros you clone your repos in there in Linux and then you start like you said you just type code space Dot and it will open up that directory in your windows GUI not in a Linux GUI but in your windows GUI with all the Great Windows advantages and it's and with code and like you said I think jetbrain's the other ones all sort of do this now too they understand WSL so it seems like you're running on a Linux it's almost like you're this weird hybrid of all the advantages of Linux desktops all the advantage of a Windows desktop um and if you do that mode you get the best file system performance uh you get the wonderful GUI and you're saying it's running this magical WSL vs code server in the background on Linux by the way this is the same way we can all do this same setup with a code space on GitHub or a remote uh Dev server vs code has that of course I think all the other ones all the other big Des have that as well now but um heck even if you're a Vim user you still have tmux like you can still use TMX over SSH and still have remote Dev environments but um this is there's a lot going on here so I don't want to trivialize for those that are they're new to this um before we go to the next thing I want to get through some of these questions because people have been patient um the uh Ajay is mentioning SSH by the way is there a reason to SSH into WSL is that even a thing why would you do that so yes um we have again we have to be really aware so the more we we scratch the surface the the bigger the old is of course and here is that Windows uh maybe a little known fact for people that are not working on Windows but if you are in developer mode on Windows you windows by default will run uh SSH server in the back end for potentially some services that it needs and you can if you you can configure it and run it so the port 22 is by default used um sometimes for the tools that that was previously like when we didn't have this connectivity uh of having vs code that can connect remotely jet brains that can connect remotely you can uh run a SSH server on uh your WSL distro and what it does it's like Double SL has this interoperability also Imports so it will forward the ports that are open by default you can stop that but by default it will share the port with the localhost of windows so if you have some setup going on you can easily or more easily connect to your let's say Windows machine for example true SSH on WSL so ussh or Windows machine but what it does is like you are sshing to the Windows machine double cell distro that is running the SSH server and when now I think it's a bit better but at some point in time configuring SSH on Windows server for example uh was kind of difficult because you have to run scripts to adapt permissions and everything so the easy way will be to to go directly with SSH on on um on WSL indeed but again you can run it but you just have to be really careful because it's one VM how I didn't explain it but I I really want to to address the bank because it's already yeah it's true it is one kernel right all these differences so that's one VM so uh let me show you then because that was a good question I saw that question too uh just came in how can you um I'm not sure how to say that uh how do you make a fresh WSL VM essentially um yeah so whenever you call WSL uh now I'm listing verbose and here is like all the WSL distro that are running again that's not the same you cannot see it because I I modularized it but for example here you can see uh Docker desktop data for example here and you will not find it on the menu here because that's just the data distribution like credential desktop data is the same uh that's these shows that are not really this or they are just here to share uh like uh files uh so I don't really want to work with them but still they are distros and here you can see like Ubuntu podman machine also is running currently but at the end of the day there's only one machine running so let me actually run uh Tumbleweed again so here I have tumbleweeds I have Ubuntu and if I'm a bad guy which I am and simply shut down WSL okay it will relaunch because of Batman but here you can see that Tumbleweed got destroyed and Ubuntu got also disconnected destroyed if you want so this means that behind the scenes yeah yeah uh behind the scenes there's only one so let me again do a WSL Dash L Dash V just to ensure that yeah so Ubuntu is running again good so now uh if I use a tool called HCS diag which is like the uh I think it's like hyper-v um communication no control system Diagnostics or whatever it stands for um and I do lists now you can see that I have here the micro VM running behind the scenes but you can only see one so let me open again tumbleweeds let me open I'm clicking on Purpose By the way because you can see that I have like these shortcuts yeah but I'm a Windows guy so I I'm going for by the menus I like that yeah anyway so yeah so you're starting up all these different yeah okay sorry okay so you're showing yeah it's still just a single VM yeah cool okay so that's really one VM at the end of the day and that's something that happened Years Ago by the way for those that are catching up from like the early days of window 10 WSL is that they remove the need to have hyper-v even installed in order to get your wsl-2 setup going and that's how we can have like Windows 10 Windows 11 Home and these various additions that don't come with the full enterprisee hyper-v setup we don't actually need that anymore so I had to change all my course videos because I used to have to tell people well if you're if you're on a home version this is how you're going to have to do it you're gonna have to use you know if you remember Docker toolbox back in the day and um but now we now Docker desktop works everywhere it works on every Edition all versions uh and we get all these features in wsl2 regardless yeah yep the magic here is this one virtual machine platform and that's the what they ported to the windows uh home Editions nice so we still have virtualization but it's like very lightweight uh visualization you will not have uh the hyper-v for example there yeah Lee by the way asked earlier what does Mount show in Linux if you were to run the mount command does it does it show all the windows the Windows File system and stuff like that yes good question shows a lot okay so yeah well there are containers involved so it's a lot yeah so first of all the C group is hybrid which is no good but soon we will have C group 2 finally uh I'm pushing for it so you can count on me um then there's uh quite a lot of things here on MNT double cell G which is for stands for graphic that's where all the magic occurs for the GUI stuff okay so uh let me go go here uh uh do I have like noon terminal I will launch it but uh yeah okay cool I will launch it now and potentially we will wait until it's yeah because 400 megabytes but let's uh let's keep it okay sorry and then um we have all the normal mounts that we have here so let me just now grab for uh Slash MNT for example and here we have the shared drive like uh like I call you like the share Mount which is mntw cell uh all the these toolings like um Docker desktop printer desktop whatever that wants some tooling that needs to be shared across all like say the socket for example you don't want to socket on like to configure the socket on every distro so you put the this uh you put the socket in the the shared Mount and then you just uh link it or turn a little whatever they do so um cool I think RJ's asked he's got a lot of questions um the terminal the terminal theme it's not that just is that the default theme for Windows terminal oh yeah yes or no um so first of all it's the terminal preview yeah I have the preview because if I go here and on settings now they have this new tab menu where I can actually put my stuff in uh in a different way so that's yeah that's where you get the multi the cascading menu exactly okay yeah Chris Chris I was like no who was it uh it was Daniel Daniel uh was saying a Windows terminal preview is the one you want to install and I was asking like what what does that do for us so yeah the preview gives you that extra feature but okay cool yes so it's the experimental features like beta features not really experimental but more better features that come in and uh sometimes they're really they're really nice uh then the what you can do is like there's a website if you type like Windows terminal teaming and then uh you will be seeing that in color schemes for example I installed quite a lot more than what we have so uh by default so that there's that actually yeah nice I like that I I haven't checked all the recent features in the last couple of years because I don't use it every day but that's that's it used to be just a config file it's nice that we're now getting a little bit of a settings GUI okay and here's the gnome terminal [Laughter] nice okay you can which would probably not give you the that would probably avoid the the windows uh Line Feed problems right since it's a little yeah exactly exactly exactly but here is like Norm terminal but you can tell that uh it's like uh so it's the gnome or gnome sorry The Gnome um UI okay so there's rounded but you can tell by the the look and feel that it's not windows at all and one thing is like if I try to take a screenshot of a window you see the borders they are a bit more uh so that's how you can tell so if I compare it with uh with what well with the terminal for example again you see like here the border is that's interesting okay so just in case you want to take like screenshots by the way it's it was Windows shift s uh like screenshot uh the shortcut to to have like the now the so here you can you can see like it will take the Dual border and if I go check here you can you can see that it took like a little bit more because that's the real window because the what we cannot see here is that it's a remote desktop window that is directly loading the application but as you can tell it's like fully working great very cool Rich has a question um he works in wsl2 all day using a single Ubuntu distro with vs code I save all data to Linux user home what is the best advice to backup data and run multiple distros move right so I had the friends uh Jason shipwreck um I don't know how to pronounce his name but it is working for solo now and uh he actually destroyed his VM is the distro so what I can show you is that uh let me see which one it's okay uh I would like really to Showcase uh the others but uh okay Amazon I didn't do anything with it so uh let's start Amazon very shortly here we go so uh okay it's not even configured so it's all good so uh let me CD and touch my important file okay and one day for whatever reason you kill Amazon sorry you don't kill Amazon but yeah so now you don't have Amazon anymore so I can go here if I want and try to launch it and I will have an error so I lost all my work so first thing first is like if you have Ubuntu by canonical directly from the store uh uh it will be in update uh some pass of obscure pass but if you find the W uh the vhdx save it and like save it uh as much as you can like maybe once a week or do a sort of backup that's a very good segue I'm not paid by them but they are friends so there's raft WSL created by penguin group and if you so it's a paid solution but you can run it for two weeks for example to to have a glimpse and from here for example if I take Ubuntu they have the solution directly to actually uh take a snapshot so you take a snapshot I will call it the red show create and it will actually save my all my data into this snapshot so now you kind of more safe that's part of the so it's called raft you can find it on the Windows store it's 14 bucks a year I think but worse do you know if in the background each one of these distros is its own vhdx file or is this all yes no no they have all yeah good question uh so here like uh I I wrote like it was like I have the distro once but I have the custom ones and the custom ones I put them all in the same place and we will go there so I tend to myself to create a slash wsld straws okay and okay backed a bit cool um and here uh it will create every time that you import okay maybe it's not the best teaming right now uh but yeah okay I don't talk to this time uh if I do deer uh Amazon the one that I killed so there's nothing there and if I go check Arch now you can see that I have the X4 and it's like 500 Megs approximately and if I do the same with Wolfie from chengard uh way smaller and it has his own vhdx so yes and that's why I attend and that's just me that's not really let's say uh a best practice or anything but I tend to import my distros myself because I know where I put them in any case I can simply like um save them and the best thing is now very shortly is now that you can import these throws based on vhdx also so you can export it in vhdx and then re-import it as vhdx yeah I mean in general um because I was watching that little uh raft or whatever it was uh thing you were showing and I was thinking you know in the background we've had this the Windows File system snapshotter for a long time if these are just vhdx files uh like there should be a there's probably someone who's created a gist on like a couple of the commands that would easily snapshot export and yeah so it um it's all probably very yeah so now if I go just here but uh it's like you can export uh uh if you do export you can export directly the vhd so you can make uh like with WSL now you are able to do double cell export which this show your file name or dash dash vhd your file name and then uh if something goes wrong you can import it uh and there's like a vhd also here nice yeah it's getting easier um oh yeah and there's there was a question number uh yeah so we've got several people in chat I see you people all saying yeah I've destroyed my I've destroyed my distro I've messed up um you know it's happened this happens yeah um it happens all the time to me where I'm I'm I'm in a container um I'm messing around and I'm like you know what I'm gonna leave this right here and I'll come back later and then Docker comes out and says hey we need you all to test a new beta and then I just do a a system clean and I'm like oh yeah I lost it I lost it all yeah I don't usually lose the source code but whatever I was working on it was built um I've done that too um there is that risk but you know I would hope that nowadays like wsl2 has been out for a while now I'd hope that any of us had like enterprisey or cloud-based backup tools that for Windows I would hope that those would at least yeah that's something that don't people don't really think about that's the problem is like again it's an OS inside the noise kind of so you have to still think a little bit more about how to save it your your tooling that's why and again I really recommend you to save the vhd and continue working under this cell rather than starting to actually move your all your work files into the Windows File system for now at least okay because that's that's one thing is like once you lose once or even twice your distro then you start getting frustrated because you you lost files you lost configurations whatever so what you do is like you try to move out of WSL for your uh for your files and that's a bad calculation in the long term yeah and uh another question that was asked earlier um around you know is there is a way from one distro to create multiple WSL distros I don't know how to ask that question even um basically so yeah no no you can you can but it's the name yeah I I know what uh it means um like two different ubuntu's of the same version exactly but yeah the story doesn't make this obvious the store kinda no so via the store you can not really the only thing that you can do with Ubuntu is like install Ubuntu itself like without the name and which is 2204 right now and then you install uh Ubuntu 20204 which has another name actually and because the you cannot install twice the same name actually right so uh uh let's say Wolfie so let me take Wolfie here like if I try to re-import Wolfie as it is as I did before it will say like uh no no no shots like you have a distro that has already the same name however with exactly the same file which is this one here the the last one okay exactly the same file in a different uh directory that just for a better management but with a different name and again the Imports here the the important part is this one here okay so if I import it it will import it and now I have uh Wolfie sorry I'm going a little bit more fast but it's like no it's good I'm just Wolfie okay and if I go Wolfie two I go Wolfie 2 and if I uh CD touch test exit and now I go to Wolfie CD and I list sorry too fast there's no file okay so it's really separated but the naming is really important the naming here is the the one thing so so yeah so it's really I see what you're saying so it's really just it's a it's kind of like Docker containers can't have two with the same name um and it's it's just not giving us that option in the store but we can easily do it from the command line by X was that is that essentially what you're doing with importing and Export so at first someone would have to export their current one and then re-support it okay exactly so here if I search for Ubuntu then you will have Ubuntu itself without any other naming that's the one that I installed as you can see it's marked open but then I have the 2204.2 LTS okay that it's not installed but that's exactly the same actually and then if you really want to be uh on the edge there's the Ubuntu preview somewhere but I don't know yet yeah I always I mean I don't know if it's true but I always looked at the Ubuntu One is like that didn't have a version number that was basically whatever the most recent LTS is is yes yeah it's it's basically the preview is the latest one yeah okay that's um so okay enough about the Ubuntu and the WSL we I think we've done they've had great questions people I really like everyone's been great uh this is this is actually a kind of an interesting dive into the understanding of WSL because the reality is if you're working in this thing all day like you you really want to understand some of the nuances and the management and I didn't know about the backup feature through export or the the tool you mentioned um but the we're running out of time but one of the other things we wanted to talk about was sort of now the rich ecosystem and options we have not just Docker desktop which is still my favorite it's still great it's still the one I install on every single Mac Windows Linux desktop I have but we have these other ones and I think I don't know if we had this spreadsheet when you and I were back back a year and a half ago I feel like we did yeah they did it afterwards yeah okay so we have this spreadsheet that you've been helping out with and the purpose of this spreadsheet was really to one to Showcase how much Docker desktop does because it does a ton of things and if you just scroll you can see every feature I've added um it doesn't mean that I mean there's probably other features that are that exist in all these products that I'm not listing but also to show what other options there are behind besides Docker desktop if you just want to play around if you are not allowed to run Docker desktop due to licensing reasons or you work at an Enterprise that would have to pay for it or you're someone who's just interested in other Technologies like you are a podman person and podman desktop even can run extensions like from Docker desktop it can do the same thing so uh you know and we've got Rancher desktop has been around a long time it allows you to do some things like control kubernetes versions and stuff that Docker desktop can't do um which I don't need um actually yeah that's actually that is one of the features I have over here is can you change kubernetes versions and you can't in dock our desktop but you can in ranch your desktop so uh check out for those that haven't didn't know check out that spreadsheet um you can add comments if you're someone who knows a tool really well in this list or if you happen to know of a tool that's not in this list we're focusing on local container runtimes uh to allow you to run a container which may or may not be Docker or kubernetes it could be cryo container D you know podman any way to run a container um on your local system this isn't for production this isn't kubernetes run times this isn't CRI specifically this is how can I run containers locally on my host my physical machine and uh we have an increasingly large growing list a lot of people are fans of Lima nerd control made by the same people that also maintain Docker and Moby uh you know a lot of us have heard of multipass and mini Cube and and podman we now since the last time you hung out we now have podman desktop um so I can really show yeah so yeah finish and I will quickly show three solutions then yeah well so I just wanted to like warm us up to the idea that there's all these other options we have uh I need to just put the links into all these uh we have Rancher desktop for we've had that for a while now um and I have I have both I have all these installed locally on my machine I check them out every once in a while I admit I I I I have a creature of a habit so I was using Docker desktop a long long before all these so I tend to still use Docker desktop yeah um but we're going to talk about some of the stuff uh we you know there is tons in Docker desktop that we can talk about but we also just want to highlight some of the other ones so let's go yeah let's go so the first one uh I will I will finish with Docker desktop I have like three demos with Docker desktop quickly uh sorry for the time uh wsl2 took too much time so it's fine it's good stuff people were asking people were asking so good so Batman desktop uh arrived this year um or past year uh maybe a small story behind is that someone else from the community created actually the Penman companion I think it was called um and was really nice and then uh the team behind podman actually created an official podman desktop uh months after it um so the interface seems quite the same so they might work actually with the the lead developer of the other solution uh but yeah so from here okay dashboards uh I'm not running anything so you won't see anything uh from here you can run containers um Batman is something maybe people don't really realize but was created also for running buds locally not in on kubernetes by itself um um so you can run pods directly with Batman which is quite nice um then you have images here uh and then the volumes and in terms of settings is a bit more uh let's say it's they have good settings but uh seems a bit more archaic compared to the the other two that we'll see just after uh it's more like uh yeah pure developer interface here you have to know exactly what you have to enter uh right like right there's no menus there's no nothing so but yeah but still uh really good um you have the podman machine which is the actually the one that is really working behind the scenes so since Batman 4 Batman machine is aware of WSL so you can run podman machine and create actually a new machine um let me see where am I here uh okay so here I have godman okay and if I do podman machine list Maybe okay hey here we go so here I have like a Batman machine default and as you can see the VM type is WSL so it's aware and meaning like every every everything that I will be running will be actually running in the podman distro that is created which is this one here and something that I did here I have container host so let's go for the Batman machine and I can now uh enter my host directly if I want and if I do uh oh yeah sorry Etc OS release uh it's Fedora so the funny stuff here is that Fedora and every red that this shows are not officially present in the Windows store because of some licensing discussions with Windows to put it uh simply and the the thing here is like you can have your Fedora uh directly with Batman on windows so it works quite well I mean uh as you can see if I exit here yeah I have to exit twice but that's okay okay I would let me exit everything here okay cool uh so Batman run dash dash RM uh hello world okay he doesn't like it but it's by default uh checking and there's the hello world from Batman instead of The L Word from Moby but yeah so nice that's that's it I like I like Batman and the team behind I know uh like one of the developers behind really really helpful and always like uh wanting to help so uh hi I don't remember his name but yeah very cool he's really cool yeah and so like you said the one thing here is that it can run uh Docker desktop extensions um I won't do it right now uh I tried it couple of them but uh sometimes it doesn't really work well because padman even though it's like can run Docker commands it's not 100 compatible so I try everything yeah so for Eric I tried to sneak because I wanted to Showcase it from here and it simply didn't work because it doesn't understand the Json output for example so um so your mileage may vary is what we would say on extensions but it's just cool that they they actually added that I was impressed when I first saw that that it it can kind of like how there's there's all these variants of vs code that comes from the under underlying vs code open source repos and so we have the Branded vs code and then there's like all these variants and they can all still use the same extensions as that vs code can use um or at least most of them and so it's similar here where it's there are there is Docker API compatibility for sure and then there's also like an extension API that is probably not 100 coverage as podman as well as well but it's just it's nice that they're even trying that um yeah because instead of inventing their own solution yeah true the fact that we're running by the way a red hat GUI we're we're running Red Hat software or red hat sponsored software on Windows the fact that that's even a thing is actually pretty cool because podman and everything else red hat is traditionally very Linux only so you're you're not going to get a lot of support to run those tools on Windows especially GUI so this is actually a pretty rare in my experience a pretty rare occasion for Red Hat so don't quote me there but I saw kind of the past like going from there was like this spotman machine connection connectivity like you had the kind of the the the GUI uh okay thank you Eric I uh I don't have chocolate for you though but yeah uh so uh it's it's using it's using like it was using padman machine but like as a remote um UI if you want and actually CLI but yeah it's so it was connecting there and then suddenly padman machine became aware of WSL and finally now we have Batman desktop so yeah but definitively like uh like that's that's why I read that for me is sometimes a bit a mystery I don't know them I'd I don't have the world history no neither I I came after everything maybe or happened uh so I like to read that I like their products but sometimes it's like uh yeah they they they don't follow like the the standards or they create something on the side and they try it all the time so they are innovating in their way so that's quite cool anyway uh rent your desktop uh by zuza Rancher um so this one okay I'm biased right like I said I work for them I actually write the docs for them so uh I'm a bit biased here um but uh it's uh the let's say it's the tool that I use now every day at work I still use a lot Docker desktop and you will see for the demos uh because that's Docker desktop still for me leads in terms of container purely leads the way in Innovation Rancher desktop for me will will and leads a little bit but will lead really like on the kubernetes front really about like this um you can do almost everything that you that uh that you want with containers but on top of it and majorately let's say we do have these kubernetes uh from there so we have like uh images as before but by default for example we can also scan them that will be trivi by Aqua uh there's a troubleshooting Diagnostics also here and one of the the other one that I really want to show um something that podman didn't do is like padman doesn't uh integrate with uh with any WSL so you have to work on um Powershell so there's no exporting commands sharing commands like Docker Desktop Android desktop does okay the tooling behind our friendship desktop consists of uh if you have the container engine here I I switched uh to Docker D but I won't do the the demo unfortunately but I have a demo uh with k3d where you can extend the power of Rancho desktop to a multi-node but the thing is if you are running containerdy you will have nerd CTL the tool that you have with Lima okay and that will be inner dctl 3v um I'm missing one containerdy of course behind the scenes and uh another one uh yeah Lima and then you can swap the container engine the fun thing here which I like very much is that Rancher desktop Rich it's like still Challenger compared to uh Docker desktop in terms of features on the purely container environment okay but at the same time by from the beginning it was like the three os's where targeted and the two container engines were also there already so now that Docker desktop did it also now finally we can see like okay they have they see potentially I don't know someone as a bit not challenging but like a uh not in a bad way but like a good competitor like a sync competitor and then Docker desktop also brought like the Dual engine and we will see that just after and one thing that you say sort of said before we can actually uh swap the the kubernetes uh versions which is kind of cool one last thing here uh there's the allow the images for now it's experimental but for example you can just allow certain images to be pulled uh so Docker as it but for the the Enterprise solution the yeah the the way that I actually kind of perceive these the docker desktop versus ranch or desktop discussion is like Docker desktop is kind of meant to just um you install it and a lot of its settings and and functionality is sort of like a developer focused workflow things like um which extensions you want to add and yeah um you know maybe do you want us to start I mean it's got It's all these things that are sort of like a developer that has an awareness of containers but to me but Rancher desktop is like the tool for a contain someone who really wants to dig in and be involved with containers they want to try a different command line they want to swap their runtime in the back end they want to change the kubernetes version these are all things you can't do in Docker desktop because Docker desktops are trying to give you the happy path approach of hey this is everything you know and love and we just do it all in one shot exactly and then Rancher desktop's like we allow you to toggle all these different knobs that you may not even you some people just don't care about right they just one Docker they want Docker engine running on the background they want to use Docker compose they want that they want the latest version of compose and Docker all just built built together in that stalker desktop but to me Rancher desktop whenever I want to run like um my most popular use for rancher desktop even though I've still got Docker desktop running is when a student says I'm having an issue with with this lecture on kubernetes 1.22 or whatever yeah and I sure I can run it in k3d I can there's all these ways I could spin it up but Rancher desktop GUI is just so easy for me to go Boop drop the have the drop down pick the version it installs it you know a minute later I'm ready to go and but yeah I think I think you nailed it and it was already said the last time and thank you for repeating it and that's why I like okay I mean uh like I'm employee and I'm captain at the same time so I have these yeah uh split you're doing quality right yeah I I I I I I will I'm split to the movie you know like that will be me but anyway so the thing is like I truly foresee like use cases on okay of course that's a VIN van Vin diagram where you will have uh like the middle that will be cross over but I like you said one you use the developer comes in and there's an abstraction a full abstraction of what is working behind I have to click some buttons and I have my environment working Docker desktop the other one it's more like okay here is the tooling that you don't have to care no more about we provide you the tooling we provide you with some actually uh features on the UI but you will have to go through CLI Docker desktop nowadays potentially you can run compose files you can have the dev environments you can scan files without even touching like a command line so you just touch your code and that's it so it's really focused to the to the developer to the really the almost the extreme and yeah all this abstraction is a huge Innovation a huge development we take maybe for granted I don't like the more abstracted it is the more thoughts was put into it Rancher desktop hopefully will become exactly the same for the kubernetes worlds where you don't you abstract kubernetes fully and you can just develop and push to kubernetes and the the thing here is like you have to understand like we have the end-to-end mindsets like the same for Docker in terms of developer here is more in terms of kubernetes where the mindset is that in production you have a version a specific version you don't have latest that's a No-No okay so here you can pinpoint exactly the same kubernetes version developed for that version debug on that version and then push to the same version that is running in production so it's more end-to-end mindset around kubernetes more likely and you can run also like Docker and containerdy stuff but for me it's like how I I like to to present it where the the pass will my kind of like uh diverge from one and the other but anyway yeah all right we have time for one more demo yeah you get to pick the demo that will be okay so I will go to the crazy thing then directly okay so let's let me run Docker desktop first yeah I need to wait because they share like Rancho desktop uh share the same why Docker desktop is like the one that innovates uh again on the container front like everything in on Windows like the the shared sockets between WSL okay uh what I didn't show is like Ranger desktop is also running on a WSL version or a double cell distro behind the scenes right like Dr desktop is the same when I'm working on Linux okay so here let me just swap uh very fast to here and now I hope there's Docker people because that's the feature requests um one thing that's from Windows side now uh that we forgot is that Docker is the best still today way to get uh Docker for Windows like Docker containers for uh in Windows so here if I do a Docker info hopefully it will come fast please quick quick thank you uh I'm running on WSL okay so no big deal if I do a Docker context list I can see that I'm running okay now I will have to do this one here like that that's true yeah kind of okay so it's running two things it's running default context which is my Docker engine context and mind the the pipe here but it's also uh running directly another pipe behind the scenes that is the Linux engine that's cool but let's now Switch to Windows containers hopefully it will be fast okay it's done so let's us do again the same and okay now you can see the difference here the engine is still the same okay so if I do a Docker info again this time I don't have WS okay shouldn't come WSL just a second okay didn't switch why oh yeah do you need to switch your context so like is the default one always Linux oh okay but yeah Okay cool so doc okay good point Docker contexts uh yeah I don't remember what it's called that's funny because normally the enzymes should swap to the windows now yeah and I should be info okay and now I can see that I'm running on Windows okay so here it's uh Windows pass that's the root deer and again if I do uh images I just okay took the server core okay so uh but potentially that's okay that's cool so it's working so I broke it uh because that was my demo it was to show case how you can run both Linux and windows at the same time so if I do a Dr run again of uh Alpine so it will be short it will run it will download it and I'm running Alpine okay but remember here okay let me put it here okay okay I'm not on I should be on Windows right so it means that I can run both contexts at the same time um so so this is two different engines right so we're we're technically running the docker D dot exe engine on Windows as a service I bet and then we're running the docker Linux Daemon inside of wsl2 and you're just using the context which by the way for those that didn't know like Dockers had this context command for a long time now it's not very commonly used because we all tend to just SSH into things or whatever but you can create a bunch of different contexts actually for a lot of different places a lot of different types of connections but in this case you're swapping between engines using sockets so this is actually different this is actually the first time I've seen you do this so I did like this was not something we prepared ahead of time and this is a little bit different than what I remember back in the old days of elcal when we were when we were sort of using one engine but it was sort of bridging between platforms or something yeah exactly but here you don't have to you are using leveraging in both containers on Windows as they should be and you are leveraging WSL containers because the pipes are different so the connectivity to the enzymes that are running on the same time are totally different and here by default when I will run Docker context desktop so the server core I pre-downloaded it because it's uh it will love taking as much time yeah so now let me run something called process Explorer it's uh from the Seas internal team and here if I go to the most RAM used I have this one here 600 megabytes that is being used by the new container and remember the tool that I showed you before it's even better now we can see that I'm running an hyper-v container oh look at that yeah okay so that's cool so that's what you you should have been doing until now uh but since 2000 or 2022 now I can add here an isolation called process and now let me come here first I go to the very bottom I will try to put here and look behind the screen when I will run it and you will see I have in it so I have processes now and no more VM and now you can tell there's the 1416 156 and if I get get process of Powershell I have the ID so I can run also containers like the latest versions that's really important Windows is kind of picky but the latest version of Docker desktop on Windows with the windows engine can run process mode also yeah and this is something that's been going on for a while too right like we had to get like if you go back in time actually because Docker started offering or Microsoft sorry Microsoft server started offering process process and hyper-v isolation in Windows Server 2016 if I can remember my dates correctly and that wasn't originally even an option on Windows desktop we could not do process isolation we always had to run things on windows inside a hyper-v VM that was running core or whatever so what you're showing here is a more efficient way if you're someone who's running if you need to run windows binaries in Windows containers and you don't want to have to run an entire VM in the background with you know the one or two gig uh OS download and all that you can you can actually avoid that with this processor mode right or isolation processor isolation yeah yeah so again the you need to be careful when it's process isolation so it's still a container but you are kind of in the outside now yeah so someone's like if you launch mode pure isolation yeah you should run the normal isolation which is hyper-v and Microsoft documentation the last I checked it was a couple years ago but Microsoft documentation for those that are are this is like blowing their brains out right now like they're they're super they're like what is happening uh there's actually good documentation that Microsoft explains hyper-v versus process isolation so yes you can you can I'm not we're not going to pull that up but you can probably just Google around but processor versus hyper-v isolation I've done that multiple times over the last half a decade and uh you get a sense of what Microsoft's trying to accomplish this is actually something that Linux doesn't do this is actually something that Microsoft invented for containers on Windows where they allowed you to have better isolation which we now we we can we can technically now do that in Linux with different uh container runtimes um and but in Windows it kind of kind of kind of comes out of the box and it tends I think it tends to default to hyper-v isolation but can't you change that I think you could change the default actually at least you could used to be able to change to do processor isolation only yeah yeah so here I don't have anything anymore but let me just quickly swap so it's the last last last demo promise uh after this one I don't have any more uh I just want to swap the okay WSL cool I'm back um so here in features in development now we can use container d and you have done it before but the good thing is like now uh okay sorry if I go to our friend yeah sorry we're in WSL too we're back in Linux container mode and I can do a Docker compose up it will share okay it will open the ports uh let me go to localhost exactly and I have the demo cool but remember that the demo here from Michael Ctrl shift d to duplicate my my tab okay so it just to gain time um so that's uh that's yeah a Docker file I guess uh the docker file yeah here we go so that's the wasm uh demo that they they built a Docker so I have on Windows and that's how I want to finish I have the possibility to have Linux containers Windows containers at the same time and thanks to container D now I can also uh the wasm containers all at once so so the three types because technically containers are a different type of container that require a different part of the runtime a shim which we've which for those that are interested in waslam we did a great show here uh in December so go back in that in in this YouTube just search wasm Brett Fischer or something and you'll find uh Nigel poulton on the show and we we went through some like what is wasm why do we care about it and that's actually it's funny I didn't know you were going to do a awesome demo but it's a good point that you're now you're basically running to date the three different platform options or I guess the three different OS options that we um uh have in fact if people if you think about it for a minute we've always had this dash dash platform option or at least for a very long time in Docker and that allows you and a platform in Docker we should say is a combination of the hardware chipset so like arm or Intel or Mainframe or X you know 3 386 or whatever and then the OS that's running on that Hardware so whenever you whenever you do a Docker run on Linux you're actually getting this this platform decision and it all happens in the background and it's kind of magical and it just defaults to whatever the engine is running on it the engine's running on x86 it's going to download it x8664 image and it's going to be on a Linux binary compatible format but we don't realize it in the background if you're doing a Windows container it's then a you know x86 64 Windows uh um or actually the other way around right Windows slash x8664 or amd64 for most Windows people but now we have this new one wasm was e32 I believe is is the platform name in there right yeah um yeah and it's and yeah you're you're like super bleeding edge on this so I'm appreciating Us ending on the bleeding edge note because this is this is all like happening in real time um I'm kind of I'm still standing a little bit of your thunder sorry I know you were going to probably explain wasm for a second but oh no no no I don't know at all I know I can run it so I'm not a Dev like I said all the time I know that I can play with it so uh uh definitively it's something that uh we should like bring uh test it and here again if I want I can create another context going when I'm in Linux now I can create a context and go back to Windows also uh because the containers are potentially running and everything so now the good thing is like I can arrest some Docker devs uh to have containerdy on Windows hopefully uh as we have because wasm I have plenty of questions uh uh that are not really answered but I will keep it for another show uh but there's lots of demos that we can do and again just I hope like the windows side how it grew up to be you can really do whatever you want almost that that's really like the for me the message I wanted to convey today is like double SL2 is here to let's say let us copy and run the the Linux demos that we see everywhere I'm fighting for docs uh since a long time now to be more windows inclusive right I'll get there someday but anyway and the the thing is like we what I like uh is that in terms of development neither like Rancher with rk2 actually they are leading front on kubernetes Windows uh nor Docker nor Microsoft are forgetting Windows as a platform not just to run Linux uh uh containerized on wsl2 like workloads containerized workloads they're still developing windows and people in some companies they need that so it's still there don't be afraid and like I showed like by the way the Dual context is not supported by Docker whatsoever so if you have some bugs I think you have better chance to potentially come to me or to vinicius the other uh let's say oriented Microsoft uh Captain um working at Microsoft even better but uh the thing is like uh you can do everything you want on Windows if I can end like that yeah that's a perfect ending so we're both on Twitter you can get our Twitter handles below um we both hang out in the docker captains chat so if you have Docker questions uh if you have Rancher questions if you have uh suicide questions or Susa or however I'm saying it wrong uh if you have WSL questions nunos out there find them on Twitter I'm assuming you're on Mastodon as well now um yeah yeah we're all hanging on a hatchyderm server so um and then we're in the slack for Ducker Community if you if you know what that is find us there if not um we're also in at least I am I'm not sure how do I actually know if nuno's got an account yet but over there is the devops dot fan Discord server if you didn't know about that that's it yeah there's 12 000 people hanging out in there uh not all the same time but uh that would be a lot of chat uh but there's devops people there all the time hanging out I spend more and more more of my time there lately as the the conversations have gotten uh uh really good lately and it's really interesting stuff so if you're in the containers if you're into devops Cloud native uh way of doing things um come hang out with us on the Discord server so thanks again sir it is great to have you as always I'm always learning stuff I'm always learning stuff from you and every time you get me one you know a couple of feet closer to changing my whole life and going back to Windows I didn't even show you like uh the last time I did it so you can go back to the the last one but remember you can do GUI apps on containers running on Windows directly yeah so it did show like you did show us a Linux terminal GUI in coming from WSL but you didn't show us a a GUI inside of a container which can also be on Windows and yeah look up Nuno and Brett on YouTube and find our show from a year like 2021 and he was showing that off it was pretty slick I didn't even think you could do that and it's a pretty neat thing if you want to run isolated doubly isolated uh guis on your windows environment so we will of course have you on again in the future it's always good to catch up and to learn all the latest stuff in WSL and all that all the Corsair hacking you do um and we will see you all next week so for the show uh next week we are having q a so if you didn't know the net get the the word um more q and A's I'm gonna have a guest host on with me Matt Williams who's maybe still in chat um uh Matt Williams from um infra you actually saw him on the show last year he's going to be here um I think Nuna and I got to meet him in the real world at civo navigate a couple weeks ago so that was a fun hang out with everyone there and so we're gonna be answering your your questions on Docker kubernetes learning learning cloud native like what are all the best resources um what's how you know where do you go to learn this stuff and you're we're here to answer your questions um just like we did today only we're going to be doing it on everything containers not just not just windows or Linux and windows um so thanks again everyone we will see you again live next week same time here and uh ciao thanks Nuno see you soon bye everyone thank you thank you thank you [Music] foreign [Music] [Music] [Music] [Music]
Info
Channel: Bret Fisher Docker and DevOps
Views: 331,687
Rating: undefined out of 5
Keywords: docker, kubernetes, developer, bret fisher, cloud native, distributed computing, automation, containers, docker mastery, kubernetes mastery, devops, eBPF CNI, kubernetes cni
Id: pjVI22ICpMQ
Channel Id: undefined
Length: 108min 38sec (6518 seconds)
Published: Thu Feb 23 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.