Docker Installation
In This Document
Contents
Core Sections
As mentioned in the requirements, you need to install Docker to run this project. This page provides guidance on how to install Docker on different operating systems.
Docker provides a consistent development environment across all platforms, ensuring that your application runs the same way in development as it does in production.
Install Docker
- Ubuntu
- macOS
- Windows
Install Docker on Ubuntu
Follow these steps to install Docker on Ubuntu:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
su - ${USER}
You may need to log out and log back in for the group changes to take effect.
For more detailed instructions, visit the Digital Ocean guide on installing Docker on Ubuntu.
Install Docker on macOS
For macOS users, Docker Desktop is the recommended way to install Docker:
-
Download Docker Desktop for Mac from the official Docker website.
-
Double-click the downloaded
.dmgfile to open the installer. -
Drag the Docker icon to the Applications folder.
-
Open Docker from your Applications folder.
-
Follow the on-screen instructions to complete the installation.
If you're using a Mac with Apple Silicon (M1/M2), make sure to download the Apple Silicon version of Docker Desktop.
For more detailed instructions, visit the official Docker documentation for macOS installation.
Install Docker on Windows
"Wait! Do you really want to install Docker on Windows?! Developers should use Linux."
However, if you must use Windows, you can install Docker Desktop for Windows:
-
Enable WSL 2 (Windows Subsystem for Linux 2) following Microsoft's instructions.
-
Download Docker Desktop for Windows from the official Docker website.
-
Run the installer and follow the on-screen instructions.
-
Start Docker Desktop from the Start menu.
-
Verify the installation by running
docker --versionin a command prompt or PowerShell.
Docker Desktop for Windows requires Windows 10 64-bit: Pro, Enterprise, or Education (Build 19041 or later) or Windows 11.
For the best development experience on Windows, consider using WSL 2 with a Linux distribution like Ubuntu for your development environment.
Install Docker Compose
- Docker Desktop
- Linux
Docker Compose is included with Docker Desktop for Mac and Windows. No additional installation is required.
Verify the installation:
docker-compose --version
For Linux, you need to install Docker Compose separately:
sudo curl -L "https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Verify the installation:
docker-compose --version
Post-Installation Steps
After installing Docker, it's a good idea to verify that everything is working correctly:
# Run a simple container
docker run hello-world
You should see a message indicating that your installation appears to be working correctly.
Common Issues and Troubleshooting
Docker daemon not running
If you encounter an error like "Cannot connect to the Docker daemon", try starting the Docker service:
# On Linux
sudo systemctl start docker
# On macOS/Windows
# Open Docker Desktop application
Permission denied
If you get a "permission denied" error when running Docker commands:
# Add your user to the docker group
sudo usermod -aG docker ${USER}
# Apply changes (log out and log back in, or run:)
su - ${USER}
WSL 2 installation issues on Windows
If you're having trouble installing WSL 2 on Windows, refer to Microsoft's troubleshooting guide.
Next Steps
Now that you have Docker installed, you can proceed to the Project Setup guide to set up the Planet project.