- 1 Windows
- 2 MacOS
- 4 Alternative options
- 6 Interacting with Docker
This document contains information on how to install Dockeron your computer.
Download Docker for Mac from the Docker Store at You will need to log in in order to download the installer. You will need to log in in order to download the installer. Docker Toolbox is a good option but currently it seems like Docker for Mac/Windows is becoming better and Docker is investing a lot of time polishing the app. I recommend installing Docker mainly for 2 reasons: It doesn't interfere with Docker-Toolbox; It runs on HyperKit and therefor runs on you own localhost rather than a Docker Machine IP. Install and run Docker Desktop on Mac ? Double-click Docker.dmg to open the installer, then drag the Docker icon to the Applications folder. Double-click Docker.app in the Applications folder to start Docker. (In the example below, the Applications folder is in “grid” view mode.).
Although you can access an online Docker environment without installing anything onyour computer (see Section 4.1), you should consider this optiononly if you really cannot install Docker.
The installation procedure depends on the operating systemthat your computer runs.
The installation procedure depends on the Windows version running on your computer.
1.1 Docker Desktop for Windows
If your computer runs Windows 10 64 bits (Pro, Enterprise, or Education, build 15063 or later),you can install Docker Desktop for Windows (recommended).
What Is Docker Toolbox
Hardware prerequisites
- 64 bit processor.
- 4GB system RAM.
- BIOS-level hardware virtualization support must be enabled in the BIOS settings.For more information, see Virtualization.
VirtualBox users
Docker for Windows uses Hyper-V as a virtual machine to run containers.Unfortunately, Hyper-V and VirtualBox are not compatible;when Hyper-V is enabled, VirtualBox will stop working.
However:
- The existing VirtualBox images will not be removed.
- When you want to use VirtualBox, you can turn Hyper-V off.
Cannot/don’t want to install Docker Desktop for for Windows
If your computer doesn’t meet the hardware requirements, or youdon’t want to install Docker Desktop for Windows because you don’t want tomess up your VirtualBox installation (although you shouldn’t really worry about the latter),you have two options:
- Install Docker Toolbox for Windows (Section 1.2).
- See the alternative options (Section 4).
Installation procedure
- Download Docker Desktop for Windows.
- Follow the installation instructions.You might need to restart the system to enable Hyper-V.
- Verify your installation (see Section 5).
1.2 Docker Toolbox for Windows
If your computer runs Windows 7 or higher, anddoesn’t meet the hardware requirements for Docker for Windows,you can install Docker Toolbox for Windows.
Please refer to these installation instructions.
Cannot install Docker Toolbox
- See the alternative options (Section 4).
The installation procedure depends on the version of MacOS running on your computer.
2.1 Docker Desktop for Mac.
If your computer runs MacOS 10.13 or higher, you can installDocker Desktop for Mac (recommended).
Hardware requirements
- Your computer hardware must be a 2010 or a newer model.Verify that your computer is compatible withDocker Desktop for Mac:
- Open a terminal.
- Run the following command:
sysctl kern.hv_support
. - If the output of the command is
kern.hv_support: 1
your computer is compatible.
- At least 4GB of RAM.
VirtualBox users
If you have a version of VirtualBox older than 4.3.30, you should consider upgrading it, asit would not be compatible with Docker Desktop.
Cannot install Docker Desktop for Mac
If your computer doesn’t meet the hardware requirements,you have two options:
- Install Docker Toolbox for Mac (Section 2.2).
- See the alternative options (Section 4).
Installation instructions
- Download Docker Desktop for Mac.
- Follow the installation instructions.
- Verify your installation (see Section 5).
2.2 Docker Toolbox for Mac
If your computer runs MacOs 10.8 or higher, anddoesn’t meet the hardware requirements for Docker Desktop for Mac,you can install Docker Toolbox for Mac.
Please refer to these installation instructions.
Cannot install Docker Toolbox
- See the alternative options (Section 4).
You can install Docker on the following Linux distributions:
- CentOS (installation instructions).
- Debian (installation instructions).
- Fedora (installation instructions).
- Ubuntu (installation instructions).
Make sure to read the post-installation steps for Linuxand to take the necessary steps to be able to run Docker as a non-root user.
If you’re unable to install Docker on your computer,you have two options left:using the Docker playground or installing Docker in a Linux virtual machine.
4.1 Docker playground
The Docker playground isan online Docker environment that you can play with for free.
- The advantage is that you don’t have anything to install on your computer.
- The disadvantage is that you might be unable to open a sessiondepending on the number of active sessions.
In order to connect to the playground,you need to create an account on DockerHub.
4.2 Docker in an already prepared virtual machine
We provide an Alpine Linux virtual machine with Docker alreadyinstalled (size: 743MB).The virtual machine will give you a simple command-line interfacewhere you can type the Docker commands.
Download the virtual machineand import it into VirtualBox, as shown in the following video(Safari users: watch on YouTube for fullscreen mode;all users: select HD quality for a better experience).
The username and password to log into the virtual machine are both root.In the video, you’ll be directed to create afolder in your computer called docker_files.There,you’ll place all files that you’ll need to play with Docker.Don’t hesitate to create subdirectories to organize your files(e.g., td-1, final-project).You’ll be able to access this folder from the virtual machinefrom the folder /mnt/docker_files.This way, you can manipulate your files by usingthe file system manager of your computer and you’ll just use theterminal of the virtual machine to type the Docker commands.
4.3 Docker in a Ubuntu Linux virtual machine
- Install VirtualBox on your computer.
- Download the ISO image of Ubuntu Desktop.
- Open VirtualBox and select New to install a new operating system.
- Choose Linux as the operating system type and Ubuntu (64-bit) as the version.
- Set the memory size (1024 MB or higher).
- Create a virtual hard disk with the recommended size.
- Select VDI (VirtualBox Disk Image) as the hard disk type.
- Select the option Fixed size and create the new virtual machine.
- Double-click on the new virtual machine and, when prompted,select the ISO image of Ubuntu.
- Follow the instructions to install Ubuntu.
- When Ubuntu is finally installed, follow the instructions in Section 3 toinstall Docker in Ubuntu.
Open a terminal and type the following command:
If everything is OK, you should see the output in the following figure.
In this course, we’ll learn how to interact with the Docker engineby using the command-line terminal.This option might seem a bit tedious(nobody likes to remember textual commands), but it offersa great flexibility.
This is the option that we recommend and for which we’ll providea full support throughout the course.
6.1 Graphical interface
If you really want to use a graphical interface, you might want to look atPortainer, which isitself run as a Docker container.
Open a terminal and copy and paste the following commands:
Windows users
Open a terminal and copy and paste the following commands:- When the container is up and running,the interface is available at the following URL:http://localhost:9000.
- Choose a password and create the user admin.
- Select Local to manage the Docker environment installed on your computer andclick on Connect.
- Click on the endpoint Local (figure below) to access the dashboard.
- The menu on the left of the dashboard allows you to managethe different components of your Docker environment (e.g., containers, images, volumes and networks).
A user guide of Portainer is very much out of the scope of this course.However, the interface is rather intuitive and you should easily find outhow to create, run, stop and remove containers, build images andcreate volumes and networks.
In this section we’ll document the installation issuesthat you might experience.
Docker Toolbox Vs Docker Desktop
Don’t hesitate to contact usto report your installation problems.
Docker is available for Linux, MacOS, and Windows.
MacOS
Docker for Mac is best installed with Homebrew and Homebrew Cask. For other ways to install on MacOS, see Install Docker for Mac in Docker's docs.
Arch Linux
Docker is available in Arch Linux's repositories. Also see Docker in ArchWiki.
Ubuntu
docker.io
is available from the Ubuntu repositories (as of Xenial).docker.io
package isn't available for you, see Get Docker CE for Ubuntu for an alternative.Windows
Install Windows Subsystem for Linux and choose Ubuntu as your guest OS. Install Docker as you normally would on Ubuntu (see above). After that, see these instructions for info on how to get it running.
Other OS's
For other operating systems, see: https://www.docker.com/community-edition#download
Verifying if it works
Docker Toolbox Version
If everything works, you should have the following commands available:
Starting Docker
If you get an error like the one below, you might need to start the Docker daemon.
Install Docker Toolbox
To start the Docker daemon, it probably needs one of these commands
Docker Desktop For Mac Download
Enabling on startup
Docker Toolbox Windows 10
For Arch Linux, Ubuntu and CentOS, this will enable auto-starting of the Docker service: