Docker Desktop Complete Setup Guide (Mac/Windows) + Kubernetes!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back and in this video we're going to be installing and configuring docker using Docker desktop Docker desktop is a fantastic solution that will work for us across Mac OS X windows and Linux as a desktop and will serve you exceptionally well in your everyday container usage the good news is that it's free to use for learning purposes on your own systems it also includes a convenient kubernetes server that is great as a learning resource especially if you're studying for any of the kubernetes exams by the end of this video we will have learned the differences between Docker and Docker desktop how to install and configure Docker desktop how to set up a kubernetes node within Docker desktop how to get started and importantly how to run some simple containers also I'll draw your attention to some of the differences that you may see between different operating systems by the end of this video you'll be in a fantastic place for getting Hands-On with containers both from a Docker Viewpoint and for kubernetes usage so to begin let's look at the traditional means of running Docker Docker was originally released back in 2013 you have your Hardware at the bottom this could be physical Hardware or virtualized Hardware with virtualization enabled next layer we have the operating system there is at the time a minimum requirement of a kernel greater than 3.1 you should be just fine with any modern Linux distribution when we install Docker this sets up our container runtime that in turn users container D and run C to run containers when this is installed we can then use the CLI to conveniently run and build containers so how does this actually change with Docker desktop to accommodate the desktop environment dockering created a friendly solution for common operating systems so your Mac OS X windows and Linux desktops in the format of Docker desktop with Doc desktop you also get a friendly user interface to support your Docker usage over time Docker Inc has further Advanced this so for example you can now run a kubernetes node and there is other awesome functionality within this such as Docker desktop extensions which I'm a huge fan of extensions essentially allow developers to bundle docker-based applications in a way in which they can be quickly installed and run and if you actually have a look there you'll have a Marketplace of applications that you can easily install if you desire so how does Docker desktop differentiate from an architectural Viewpoint to traditional Docker we have some example users each with their respective computer system so for example a laptop or a desktop and this could be running Windows Mac OSX or one of the Linux desktop variants such as Ubuntu desktop Docker desktop makes use of a hidden virtual machine or subsystem to run an isolated instance for Docker depending on your operating system the version of your operating system and the architecture Docker desktop will use different virtualization Technologies to create a hidden virtual machine or subsystem that it uses to run Docker Docker then uses this hidden instance to configure a Linux operating system with the docker runtime once this is installed you'll have the traditional Docker CLI you'll also have a friendly user interface as well as transparent networking between your host system and Docker what I'd like in particular about Docker desktop is that it's segmented from your main system and because of this you've got a lot of flexibility for example if you wanted to reset the entire Docker environment it's just a single click in preferences the same applies to its inbuilt kubernetes cluster you can easily reset this as required making this great as a learning resource given that this is quite a straightforward installation where we download an installer and run the installer I'm going to show this on Mac OS X and then I'll point out some differences at the end for Windows okay so I'm just bringing up a browser and we're going to navigate to docker.com and I will just expand that window and we're presented with the various choices for installing Docker we've got options for Windows Mac and Linux for Mac we've actually got two different options we've got Intel chip or apple chip which is essentially the newer Apple silicon variation I'm using Apple silicone so I'm going to choose that option and download that once that's ready we're going to open that installer if you're using Windows or Linux with a graphical UI it will be the same process you'd have an installer that relates to your system double click this and for Mac I'm going to drag that to Applications we'll clean up as we go and now I'm going to search for Docker using Spotlight for convenience and that opens I'll just expand our window and when you start Docker for the first time you'll get this tutorial option which is very good if you're new to Docker it's definitely worth taking a look I'm just going to skip this for this video and we have the main Docker page and something to be aware of if you look in the bottom left hand corner we have the docker icon with a green backdrop which tells us that Docker has loaded keep an eye on this as it will change color to signify the various stages as this starts up inside the docker we're going to open preferences you've got a tip of the week which you can choose to keep or remove there are some useful tidbits that appear every now and again but for now I'm just going to close that knowing that many of you are fans of dark system themes you can customize Docker as you like so I'll just press Supply and click restart and now that is running with a dark Docker desktop theme so let's try out Docker I'm going to bring up a terminal if you're on Windows you can just use a simple command prompt we'll expand this and we'll do a Docker run Dash I for interactive as we want to be able to interact with the container T to create a TTY a terminal input output environment for us to use for interacting with the container Ubuntu is the name of the image that we're going to use so this relates to the Ubuntu image that is available on Docker Hub we're specifying bash as the command which in this case is optional bash is actually the default command of this Ubuntu container so we could choose to emit this but for this example I'm going to specify the the command we want to run and I'm specifying that as bash at the moment that Ubuntu image does not exist on our system so it's actually going to download that image and we can see it's pulling that there and we're now inside the container environment and we can tell this as our hostname has changed note the difference between that and my system and just to confirm this I'll actually run the hostname command we've run a Ubuntu container so we can treat this just like a Ubuntu system so for example we could do an ABT update apt be in ubuntu's advanced package tool this then grabs all of the packages that are available to apt and with that populated we could for example install h-top a nicer version of top 4 system monitoring and with that installed let's just run that we can see the system information from a container Viewpoint so we can see the number of cores that are available at the top we've got the memory and swap as we're running inside the container there's a small number of processes running bash is the command we specified to run and that has a process ID of one as it's the main entry point and running process in this container we also have H top which we ran from The Bash environment okay so we'll just exit out that and that takes me back to my system if we go back into the doc preferences something I'm going to show you is the resources section and this is something which may differ depending on your operating system on a Mac as this is using a virtual machine you can customize the shared resources available on Windows if it's using the windows subsystem for Linux this is different it's absolutely fine and for what we're covering it won't affect your use I'm just highlighting a key difference between Platforms in case you wonder why this is different when you're setting this up if we wish to use docker's built-in kubernetes server you can go into the kubernetes pane and enable this notice the bottom left hand corner splits into two we've got a Docker icon and we've also got a kubernetes icon that will go green when it's actually ready and with that done you can actually interact and run kubernetes commands from your system a terminal or a simple command prompt let's check that this is working and as we go further into the course I'll explain these in more detail but for now we'll just query our kubernetes setup so I'm going to do a cube CTL get nodes and we can see our available kubernetes nodes and the version version of kubernetes that this installed for comparison I'm going to quickly show you some differences with Windows this system that I'm using has a fresh install of Windows with all system updates the installer has been run the prompts have been followed and I rebooted as per the instructions when Docker desktop starts in my case it's prompting that it requires an update to the WSL subsystem windows subsystem for Linux so quite simply we quick dock a desktop we bring up a command prompt and in that command prompt we're just going to enter the command that it provided so WSL dash dash update this is installed in the windows sub system and we're going to just accept any prompts sped this up for this video and now with that done we can run Docker and it's like it was for us on Mac if we go into preferences again we can choose the Dark theme if we desire in resources as I mentioned because Windows is using the windows subsystem for Linux unlike a virtual machine you don't get the control of the resources in this pane the same way as you do with a Mac it's a variation and again I just highlight this as a difference to be aware of with this done you're good to use Docker desktop and lastly as per on Mac if you did want to make use of the docker desktop bundled kubernetes server you can go back into preferences and just select kubernetes and click the enable kubernetes option the bottom left corner will get splint to two so you've got the docker and kubernetes icon you're just waiting for that to go green and now as per the previous example you could bring up a command prompt and run both Docker and kubernetes commands so now you've reached the end of this video you'll have a great understanding of the benefits of Docker desktop and how this is is a fantastic resource for getting ahead with containers spend some time now configuring and running Docker desktop on your own system we'll continue our journey by making use of the docker desktop installation to build and run our own containers thanks for staying with me and I look forward to seeing you in the next video
Info
Channel: Dive Into with James Spurin
Views: 7,808
Rating: undefined out of 5
Keywords: docker, docker on windows, docker on mac, docker on linux, docker tutorial, docker and wsl, docker desktop, docker complete setup on windows, docker for beginners, setup docker on windows 11, docker and wsl2, docker and kubernetes, docker and kubernetes tutorial, docker pull, docker course, kubernetes, what is docker, getting started with docker, docker windows 11, docker development, docker development environment, docker basics, docker introduction, docker images
Id: 7y50rZItKCQ
Channel Id: undefined
Length: 13min 24sec (804 seconds)
Published: Fri Feb 10 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.