Next lesson playing in 5 seconds

  • Overview
  • Transcript

2.2 Install Docker

In this lesson we will learn to install Docker on different platforms.

Code Snippet

The following terminal command will install Docker on a Linux machine.

    wget -qO- | sh

Related Links

2.2 Install Docker

Hello everyone. This is Reggie Dawson. Welcome to the Docker for deployment course for tuts+, in this video, we are gonna learn how to install Docker. Docker officially runs only on Linux. Although there are workarounds to allow Docker to run on OSX and Windows which we will get to in a moment. There are multiple ways to install Docker on Linux but the one I found which was the easiest for a non Linux user is this one. Now if you're not a Linux user you will still find that using Docker on Linux is easy as you will just have to learn a few commands. Even the Windows and Mac workflow will use these commands to an extent, so you will need to know them. If you can learn to code a few Docker command should be easy, if you want to try to use Docker with Linux but don't have a machine, I recommend, they offer free Linux virtual machines that can run Docker. Once we have our Linux machine we will go through a terminal and run this command. If your system doesn't have Wget you'll need to install it. I've included a link to a page on the Docker site which explains this installation as well as how to install Wget if you need it. I won't go into depth into this command, except to say that it will return a script that will install Docker. Again, there are other ways to install, but I chose to show the easiest way to install for non Linux users. Now bear in mind, that installation took a few minutes, and I just fast-forwarded through the footage. Now after we install Docker we maybe prompted to add our user to the group that can manage Docker. If you do receive this prompt go ahead and run the command. This will allow the user that we are logged in as to run Docker. After that the last thing we need to do is test that Docker installed correctly. We will do this with the Docker run command. Yes, Docker also includes the Hello World project. In this case it is a basic test theme as the Docker uses the test access one installations. After we run the command the image will be downloaded and run. We will discuss this further in the next video. Then we see some text and a message saying our installation is working correctly, Docker is installed and ready to go. We can also install Docker on Windows and OSX machines, as I said before Docker only runs on the Linux kernel. As a result we need to use a Linux Virtual Machine to host docker on our Macs and PCs. This is accomplished through Oracle Virtual Box. Docker also includes some GUI tools to manage docker, but to fully use Docker we still need to issue some commands from the terminal. If we are using Windows, the machine must be at least Windows 7 and should support virtualization. The Windows installation page has instructions on how to check for this. After that we need to install the Docker Toolbox. The Docker Toolbox includes the Docker Client, Docker Machine, Docker Compose, Kitematic, and Virtual Box. Now if you did any research into Docker you may notice the Docker engine is not included in this download. That is because the Docker daemon as it is also called will run on your virtual machine. After downloading the Docker tools go ahead and install them, after installing the Docker tools you should have shortcuts for Kitematic and Docker quick start terminal. First let's open the terminal, this terminal will launch the virtual machine if it's not running and connect to it. This terminal is connected directly to our Linux virtual machine, and as a result we can run all of our Docker commands from here. The cool thing is the commands we run from here will transfer over to Kitematic to make our life easier. Let's open up Kitematic. KiteMatic is a graphical way for us to start and run Docker images. Now you may be thinking why can't we just use this without the terminal? In a perfect world we could, but the way images are set up we will need the terminal to make full use of the images unless they have been configured properly for Kitematic from the start. We will talk more about this when use Kitematic. Again the cool thing about Kitematic is that it looks at the same virtual machine and can give us information and manipulate the images on our system. The last thing I want you to notice is what you are seeing when Kitematic starts. The icons you see represent some of the recommended images we can run. These are just a few of the many different applications we can run on Docker as you will learn in the next lesson. In the next video we will learn to find, run, and manage images.

Back to the top