From the course: Kubernetes: Your First Project

Installing Docker

- [Instructor] To get started on our journey, we're going to install Docker. Because we're using a Mac for this journey, I'm going to install Docker for Mac. Docker for Mac installs two things, a really small Linux virtual machine for hosting and running Docker containers and a command line client that interacts with it. It also installs Docker Compose, a tool for linking multiple containers together as if it were a single application stack. Are you running this on a Windows machine? If your machine is running Windows 10 or later, you can install Docker for Windows, which is more or less the same thing as Docker for Mac. If you're running Windows 7 or Windows 8, you'll need to install Docker Machine instead which is slightly more involved but behaves more or less the same once everything's up and running. I like to use a tool called Homebrew for installing applications on my Mac. It's a handy tool that makes it easy to download and install almost any application I can think of. If you use or have used Linux and have installed software from package managers like YUM, YaST or aptitude, then Homebrew will feel right at home for you. Side note, if you're a Windows user, then you should give Chocolatey a try. It's the same concept except more .net-y, if that's a word. Now let's get to the fun stuff. I always forget the command I need to install Homebrew, fortunately on brew.sh, which is a site that I'm on. You can copy it straight from the website. So I'm going to go ahead and do that right here from the middle of the page. And then I'm going to go into my terminal and I'm going to paste it. Now I already installed Homebrew. I'm not actually going to run this, but when you do run it, it's going to ask you for your administrator password, which you'll need to have administrator access in order to install this. And it takes about a few minutes to install. So just be patient. So after Homebrew's installed, you can install Docker easily by running brew install Docker --cask, not brew install Docker. This command will install just the command line client, but not Docker for Mac. And when you try to use it, you'll get an error about it not being able to communicate with Docker. So remember to add --cask to the end of the command. So I'm going to go ahead and hit space. Like I said, I've already installed Homebrew and I've also reinstalled Docker, but when you do this, it should download the Docker for Mac installer and install it for you automatically. So I'll know that once Docker's installed, you can hit command space and then just type Docker. And once you do that, you'll see Docker for desktop spin up. I'll know that Docker's running by looking at my menu bar here and seeing a little whale up here, as you can see here. If you see this whale and you see a stack of containers on top of it and they're not moving, then that means that Docker is installed and it's ready for you to use. If you like me, you have a small exclamation mark there, it just means that it needs to be updated. I wouldn't worry about it.

Contents