Docker
Docker is a platform that allows you to create, deploy, and run applications in containers. Containers are lightweight, portable, and self-sufficient environments that allow you to run applications in a consistent and repeatable way.
Install Docker
Follow the instructions for your platform install Docker:
MacOS
Install Docker for Mac
Once you've installed docker, open the desktop app and wait for it to finish loading.
Run the following command to verify it's working:
docker --version
You should see something like:
Docker version 29.0.1, build eedd969
Docker is installed and you're ready to go!
Windows
Install WSL 2
We will use Docker for Windows with the WSL 2 backend. This is the recommended way to run Docker on Windows and enables our scripts to run correctly.
Before installing docker, you will need to install WSL 2. Install WSL 2 with the following powershell commands:
wsl --install
wsl --set-default-version 2
Then install the Ubuntu 24.04 distribution for WSL 2 with the command:
wsl --install -d Ubuntu-24.04
And set the default distribution to Ubuntu 24.04 with the command:
wsl --set-default Ubuntu-24.04
Install Docker for Windows
Now install Docker for Windows
When prompted, be sure to select "Use WSL 2 instead of Hyper-V".
Launch the desktop app and wait for it to finish loading.
Accept the license agreement. Optionally, sign into your Docker account. or click "Skip".
Note: you may be prompted to update your version of WSL to use Docker for Windows. You can do this by running the following command in a powershell terminal:
wsl --update. Once you update WSL, click the "Restart" button in the Docker desktop app.
Enable Docker in WSL 2
In order to use Docker from inside WSL 2, open the Docker desktop app and click the "Settings" button. Then, click the "WSL Integration" tab and ensure the "Enable Integration with my default WSL 2 distribution" option is checked. Also, turn on the switch for the Ubuntu-24.04 distribution. Click "Apply & Restart" to apply the changes.
Note: running the WSL command line is easiest if you use the "Windows Terminal" application. Launch the application and select the dropdown carrot next to the "+" button to select "Ubuntu-24.04" to open a terminal running inside WSL 2.
Now, open your WSL 2 terminal and run the following command to verify Docker is installed:
docker --version
You should see something like:
Docker version 29.1.2, build 890dcca
Finally, you need to change the credential manager. In a WSL terminal, edit the file ~/.docker/config.json, delete any line that sets "credsStore" to "wincred" or "desktop" and save the file. Your file should look like this:
{
"auths": {},
"credsStore": ""
}
Docker is installed and you're ready to go!
Linux
Install Docker for Linux
- If you are using Ubuntu, follow the instructions for Ubuntu to install Docker via the apt package manager.
Once the installation is complete, open a terminal and run the following command:
docker --version
You should see something like:
Docker version 29.1.2, build 890dcca
Docker is installed and you're ready to go!