Docker Desktop for Linux Desktop Setup and Tips

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this video is from my Docker Mastery course on udemy and I've pulled this section of videos on installing Docker desktop and put them into a playlist here on YouTube you can get all the details in this series of videos look for the playlist somewhere in this interface on Mac Windows Linux both desktop and server for my preferred way to install Docker desktop and learn Docker and kubernetes locally on your machine you can get course discount coupon links below the Discord Community I have for all things devops my podcast live show everything else get those links below and I hope you enjoy are you a fan of Linux desktops this is the docker installation video for you Docker desktop for Linux is actually a new thing in 2022 people have been asking about it for years and Docker finally delivered so now we have Docker desktop what I consider the best way to run Docker locally for Mac windows and now Linux in this video we're going to get you Docker desktop the easiest way possible on Linux then we're going to tweak some of the settings you might need to change and then of course get the course repository from GitHub and get vs code my preferred editor for any devops and for Linux desktops I am saying Docker desktop is the best way to experience and learn Docker desktop on your local machine now for years we have had the standard Docker engine for Linux in fact that's how Docker got started all those years ago in 2013 it was just running on a Linux VM or server that you had somewhere and we didn't really have a good setup locally it was only until years later that Docker desktop came around with all of its extra features and the GUI but they're not necessarily the same thing Docker desktop is a superset of the docker engine and the CLI and on a Linux desktop you could choose to just run the docker engine the docker CLI and the other tools manually by installing them with your package manager for Linux but Docker desktop does a little bit different it does it by creating a VM a small little tiny VM inside your Linux desktop just like mac and windows do one of the main reasons Docker chose to do this instead of just installing a GUI that manages the docker engine installed on your host OS which you could do but Docker desktop on Linux chooses to do it exactly the same way as Mac and windows for many reasons one of them is to give a consistent user experience across all three os's for running local containers one of my favorite things about deck or desktop besides all the features and the GUI and it managing all my settings for me is that I can wipe it really quick I can actually go in and click reset and it'll delete all of the things I've changed and sort of reset it back quickly with a host Docker engine that's one of the things you don't get now you could use both in fact the docker desktop that I'm going to recommend you install here I recommend you really just stick with that for now but if you're someone who already knows a little bit about Docker and you prefer to just keep it simple command line only you could install the standard Docker engine for that the next video will focus on Docker engine for Linux server because that's really a command line only solution and that would be my normal Linux preferred option for you until now that we have Docker desktop for Linux so Docker desktop for Linux is a superset of that and again it provides all those benefits of running in a VM and it's better isolated and you can quickly delete it and recreate it it automatically updates all the versions of things it runs over a VPN all the things that maybe the raw standard Docker engine and command line which again next video for that one they don't necessarily give you but you don't have to choose you can actually run both on your Docker desk top if you wanted it's going to be a little confusing at first since you're still just learning Docker but you can actually use Docker command line something called Docker context to switch between one or the other so you can have your command line control either the one in the VM with Docker desktop or the one running natively on your host OS talking to the host Colonel it's up to you I'm going to focus on this video on just Docker desktop alone without even bothering with the host Docker engine I'm going to leave that to the next video which is more about servers now if you are a Linux desktop user which probably means you're pretty good at Linux like it's probably not your first day on Linux you're going to need to pay attention to the details and the requirements of the setup here it's way more steps and it's way more detailed than doing it on Mac or Windows it's just a simple nature of Linux desktops it's usually more involved you probably have to install some extra requirements you may have to check your host OS and not every Lynx distribution will work Docker is making it work more and more on various Linux desktop distributions but yours may not work in this video I'm focused entirely on Ubuntu specifically 2204 the latest long terms release of Ubuntu when you go to the link for this which is in the resources of this video you can find the link to this documentation that will probably change over time so maybe yours might work in the future at the time of recording this video for example men and one of my favorite desktop installations of Linux with its cinnamon GUI does not work with Docker desktop Docker desktop focuses on gnome desktop features and it does have some gnome requirements basically go read this document because it's going to keep changing as they get better and better support across the spectrum of Linux desktops and you can see here that I had to install some dependencies first really getting just curl installed is one of the most important things because I'll need that during the future install of docker and then down here I have more of the steps I had to run again I'm just copying pasting from the tutorial on docker's documentation and because this is Ubuntu I'm using apt and specifically apt-get to install a lot of this software and you can see once I get to the actual Docker desktop install look at all that stuff there's lots of packages there required by Docker desktop and that's why it's a little bit harder to make it work in every different desktop distribution of Linux because there's so many libraries here so many dependencies and this really is just showing you how much more desktop can do than just Docker engine alone and hopefully once that's successful you will see this if you search for Docker in your start menu or whatever ubuntu's menu is called you can just search for it it'll be an app that you can run and as I've said in the other videos for mac and windows that Docker desktop while not technically open source software though it does come with some other open source software like Docker engine and Docker CLI which are themselves open source Docker desktop itself is not it is actually licensed software it has some proprietary bits in it but the good news here is that it's always free for learning which I have verified with management at Docker that they intend for it to be free regardless of who you work for or what company you're on if you're allowed by your company or whoever owns your computer to install it it is free for this course it is free while you're learning the tooling and once it started the first time you'll get the licensing agreement page then you'll see the get started with Docker page which you can step through this if you'd like the same as Windows and Mac or you can just skip this part and jump into my course which is the reason you're here right now that Docker desktop GUI there will tell you whether or not Docker is running successfully but you could also just go to the command terminal and type in Docker version like we did the first few videos of this course and you'll get back the client server version if everything is good and a little Pro tip here for you make sure you log into Docker desktop because then that will pass on your authentication to Docker Hub that's where you're going to get all the downloads for this course all the images that we're going to run inside Docker all those images four containers will need to come from Docker Hub or some other registry most of the time it's Docker Hub especially when you're first beginning and that has poll limits we talked about this earlier in other videos but just make sure you log into Docker desktop with your free Docker Hub account and you don't have to worry so much about any limits you might hit of course it's no big deal if you hit them you just wait a few minutes and try again but who wants to deal with that right let's just get to it log in first it doubles the limits that you have on Dockers free Docker hub and if you try to log in and you get this credential store not initialized error like I did you're going to go through a couple more steps again welcome to Linux that get the proper credential storage Solution on your machine to securely store your Docker login and the documentation will probably change over the next few months or years so I'm going to show you what it was for me I simply needed to set up a gpg key but you may need a few more steps or it might be easier for you on yours once Docker solve some of these problems with automation and again the link for these are in the references for this lecture but you will jump over here to documentation and basically run a gpg command to create a key and then you'll use the pass tool to use that key and protect your login and you'll know that you're done and it's working when you actually click the login button somewhere in the docker interface there's three or four places to click it and if you click that and then you get this nice login screen that means it's working and you can continue with your Docker ID now that you've logged into Docker and it's working let's look at the settings to do a couple of tweaks that you might need for this course the easiest way to get to the settings is under that Docker Moby icon up there at the top remember his name is Moby he's the mascot settings are over here click it because Docker desktop runs in a VM you have resources to configure now Docker has conservative defaults which means you probably want to bump them up personally I don't mind bumping those up to a lot because I don't run Docker all day every day when I'm using it I'm running it and it's using some resources but when I'm not using it I just quit or pause it and it's not using really any of these resources I usually give it more CPUs and more RAM somewhere between six or eight gig if I can if you don't have that much don't worry about it just give it enough to make things happy when you run Docker and you'll know if things aren't happy because it'll be either really slow or you'll get back errors when it runs out of memory now this little setting is an interesting one because it's similar to what we deal with on Mac and even Windows where we're going to be sharing files later from our host operating system into the containers now in this case it's in a virtual machine which means you're sharing files from your host the source code into a container inside a VM so there's some special magic Docker has to do to share across the file systems of these two different operating systems the host into the Container inside a VM so you want to make sure that the directories where you store your source code are over there and the default includes your home directory so I just recommend always clone your code into your home directory on your local machine it has the right permissions it's automatically set up to share by default and I just generally recommend that for all of my code and I typically just put it inside home slash Brett slash code I just put everything inside that code directory that I download from GitHub or any other source code now if you've heard about vs code I think I mentioned it in every video in this section it is my favorite code editor but you don't have to be a developer to use it in fact I think it's now the best way to edit infrastructure as code files devops files assist admin files scripts anything you might do on the non-dev side of tech I still think visual studio code is the best way to do it and it runs on every OS it runs on Linux so download that and then in a few videos you'll be seeing my recommendations on your setup for vs code but really it's just about extensions my favorite extensions which vs code will actually just recommend to you when you open the files it'll say Hey you open a terraform file would you like to install the terraform extension or hey you have Docker installed would you like to install the docker extension it does all that for you so really you don't have to watch my vs code video but I do try to give you a few extra tips there and finally you just want to clone the repo from the course the lecture earlier with all the links in it in this section for downloading all the different Docker things you need includes the repo that you want to get and you're just going to click that link there the little green button and that'll give you the URL that you would use in a git clone command to download this entire course repo which you'll be using throughout the course and that's it if you're a Linux desktop user you should be fully set for the remainder of this course with all the tools you need and have fun
Info
Channel: Bret Fisher Docker and DevOps
Views: 17,576
Rating: undefined out of 5
Keywords: docker tutorial, docker tutorial for beginners, docker desktop, learn docker, install docker desktop, docker desktop license, docker desktop faq, docker desktop for learning, install docker for learning, learn kubernetes, install kubernetes for learning, docker course, docker on windows, docker containers, docker compose, docker for beginners, docker basics, docker desktop for linux, install docker desktop on linux desktop
Id: AMcvwqvgU5U
Channel Id: undefined
Length: 13min 47sec (827 seconds)
Published: Mon Sep 12 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.