In this chapter, we will find out how to install Docker on Windows, Mac OS, and Linux operating systems. There will also be step-by-step instructions on how to set up Docker in the cloud and Amazon EC2 will be used as an example. Next, we will run the sample hello-world
image to verify the setup and check whether everything works fine after the installation process. We are going to cover the following topics in this chapter:
Docker installation is quite straightforward, but there are some things you will need to focus on to make it run. We will point them out to make the installation process painless.
The Docker Engine could be run on the Mac and MS Windows operating systems by using the lightweight Linux distribution, made specifically to run Docker containers. It runs completely from RAM, weighs just several dozens of megabytes, and boots in a couple of seconds. During the installation of the main Docker package—the Docker Toolbox—the virtualization engine VirtualBox will also be installed by default. Therefore, there are some special hardware requirements for your machine.
To use Docker, you will need some reasonably new machine, that supports hardware-level virtualization: VT-x for Intel-based PCs and AMD-V for AMD processors. Most of the Mac machines support it out of the box, but for PC you will need to make sure it's turned on and perhaps enable it in the BIOS settings. It will be different for different BIOS, just look for VT-x / AMD-V switch.
In Windows 8, you can check virtualization support in the task manager in the Performance tab:
If you want to check whether your PC supports the hardware level virtualization in Windows 7, look for Microsoft Hardware-Assisted Virtualization Detection Tool. Its free, tiny utility is used to check whether your system supports virtualization. Download and run it to see the report:
If the report is different for you, saying that hardware-assisted virtualization is not enabled, you will need to check the BIOS settings on your machine, maybe the hardware-assisted virtualization support is just switched off. In such a case, switch it on and re-run the tool.
If your PC doesn't support hardware-assisted virtualization and you decide to install Docker anyway, it will result in an error during the start of the virtualized Linux distribution.
Additionally, when installing on Windows PC, you need to make sure your Windows OS is 64-bit (x64). Docker will not run on the 32-bit system by default.
We already know from Chapter 1, Introduction to Docker, which Docker components are available to install in the default installation package.
Knowing the hardware requirements, let's download it and install the software.
3.135.224.59