Tested on:
- Mac on Big Sur 11.2.2
- Docker version 20.10.2
Introduction
Docker is an application that simplifies the process of managing application processes in containers. Containers let you run your applications with exactly what they need to run, nothing more and nothing less. They’re similar to virtual machines, but containers are more portable, more resource-friendly, and more dependent on the host operating system.
What allows Docker to be so versatile and compact in size is that it utilizes the linux kernal of the host operating system it is running on. While creating the images for Docker you also only install things that are needed to run your application.
For example if you want to write python code, you only need two things: Python and some way of writing the code. You do not need to install other things like Spotify or Chrome to create Python scripts. These two parts are what allow Docker images to be deployed on any machine and they just work. There is no need of do they have this version of this or this version of that.
How to install Docker
Depending on your operating system, there are a few different ways of installing Docker. I will be covering Mac, Windows, and Ubuntu. If you are using Ubuntu, CentOS, or Debian there are good walkthroughs on Docker’s respective page.
Mac
System Requirements
-
You must have hardware that is at least from 2010 or a newer model with Intel. You can check if you Mac is compatiable with memory management unit (MMU) virtualization, including Extended Page Tables (EPT) and Unrestricted Mode. Open terminal and type
sysctl kern.hv_supportthen terminal will print outkern.hv_support: 1if it is supported. - Your macOS version must be 10.14 or newer. You can find this out with this command in terminal
sw_vers. It should print this.1 2 3
ProductName: macOS ProductVersion: 11.2.2 BuildVersion: 20D80
- Have at least 4GB of RAM installed. Use this command in terminal to find total RAM
sysctl -h hw.memsize. Note: this will print in bytes so 8,XXX,XXX,XXX will be 8GB of RAM and the X is just a filler.
Install Docker
-
Click on this link and it will download Docker Desktop. You can hover over the link to make sure that is is taking you to the Docker site.
-
Double-click
Docker.dmgto open the installer, then drag the Docker icon to the Applications folder.![Docker install]()
-
Next open your Application folder and double click on the Docker app. You will also see the docker icon in your top status bar. When you start your Docker app it will bring you to the tutorial screen. It will teach you how to build, run, push, and save a simple Docker Image. You can do through it or skip it.
![Docker Desktop]()
Congrats! You are now running Docker on Mac and ready to start learning about containers!
Windows
System Requirements
- Windows 10 64-bit: Pro, Enterprise, or Education (Build 17134 or later).
- To find your system information. Press Windows+I to open Settings. In the Settings screen, navigate to System > About. Scroll down and you will see the information.
![Windows System Info]()
-
Hypervisor (Hyper-V) and Containers Windows features must be enabled.
- The following hardware prerequisites are required to successfully run Client Hyper-V on Windows 10:
- 64 bit processor with Second Level Address Translation (SLAT) *you can find this on your processor page
- 4GB of RAM
- BIOS-level hardware virtualization support must be enabled in the BIOS settings. There are videos that show how to turn this on. For more information, see Docker’s Virtualization.
Install and Launch Docker Desktop on Windows
-
Click on this link and it will download Docker Desktop Installer. You can hover over the link to make sure that is is taking you to the Docker site.
-
Double-click
Docker Desktop Installer.exeto run the installer. -
When prompted, ensure the Enable Hyper-V Windows Features option is selected on the Configuration page.
-
Follow the instructions on the installation wizard to authorize the installer and proceed with the install. Then once finished you can close the window.
-
If your account is not an admin account, you must add the your account to the docker-users group. Run Computer Management as an administrator and navigate to Local Users and Groups > Groups > docker-users. Right-click to add the your account to the group. Log out and log back in for the changes to take effect.
-
You can either search or click the Windows icon in the bottom left to open Docker. It will show the Docker symbol in your notification tray when it is done. It will then launch the tutorial window. It will teach you how to build, run, push, and save a simple Docker Image. You can do through it or skip it.
![Docker app search]()
Congrats! You are now running Docker on Windows and ready to start learning about containers!
CentOS
Requirements
- Have a maintained and up to-date version of Ubuntu 20.04LTS.
House Keeping
-
First let us see if you already have Docker installed. If this is a fresh install of Ubuntu then you can ignore this section and move to the install steps. Run
systemctl status docker | grep Active:. If this brings up that is it inactive or active then you already have it installed. You can just go ahead and update it or start fresh and uninstall it to then reinstall it. If you are using a much older version of Docker then you will want to uninstall them.![Docker fingerprint]()
-
To uninstall use this command.
1 2 3 4 5 6 7 8
sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine![Docker remove]()
Install Docker
-
We will be using the repository to get docker. If you would like to install it manually you can go here.
-
First update to make sure we are getting the latest version
1
sudo apt update
-
Now we will be installing the current version of Docker.
1
sudo apt install docker.io
- Now, on the docker website for installing, it says that docker.io is an older version of docker but in my use, it is up-to-date to nearly the current version (release 20.10.12, apt 20.10.7)
-
Once that is done, we can make sure Docker is started!
1
systemctl start docker
- Or if you want to enable it so that it always starts when you system turns on it does as well, then run this command
systemctl enable docker.
- Or if you want to enable it so that it always starts when you system turns on it does as well, then run this command





