Skip to main content

Step 5: Docker

Time: 5 minutes
Purpose: Install Docker for containerized development and deployment

Install Docker

Installation: Follow the official guide at docs.docker.com/get-docker

PlatformInstallation MethodOfficial Documentation
macOSDocker Desktopdocs.docker.com/desktop/mac
WindowsDocker Desktopdocs.docker.com/desktop/windows
LinuxDocker Enginedocs.docker.com/engine/install

Quick Install Commands

# macOS (Homebrew)
brew install --cask docker

# Windows (Chocolatey - PowerShell 7 as Administrator)
choco install docker-desktop -y

# Linux (Ubuntu/Debian) - See official docs for other distributions
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER # Add user to docker group

Direct Downloads (GUI Installers)

Docker Desktop:

Linux: Follow distribution-specific instructions at docs.docker.com/engine/install

Start Docker

macOS/Windows

  1. Launch Docker Desktop from Applications/Start Menu
  2. Wait for Docker to start (you'll see the Docker icon in your system tray)
  3. Docker will run automatically on system startup

Linux

# Start Docker service
sudo systemctl start docker

# Enable Docker to start on boot
sudo systemctl enable docker

Verification

# Check Docker version
docker --version

# Check Docker is running
docker info

# Test Docker works
docker run hello-world

Expected output for docker run hello-world:

Hello from Docker!
This message shows that your installation appears to be working correctly.
...

Increase Memory/CPU (macOS/Windows)

  1. Open Docker Desktop
  2. Go to Settings → Resources
  3. Increase Memory to 4GB+ and CPU to 2+ cores
  4. Click "Apply & Restart"

Configure Docker Daemon (All Platforms)

Create or edit ~/.docker/daemon.json:

{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}

Troubleshooting

Docker Desktop won't start (macOS/Windows)

  1. Check system requirements (Docker needs virtualization enabled)
  2. Restart your computer
  3. Try running Docker Desktop as Administrator (Windows)
  4. Check for conflicting virtualization software

"Permission denied" errors (Linux)

# Make sure you're in the docker group
groups $USER # Should include 'docker'

# If not, add yourself and restart
sudo usermod -aG docker $USER
# Log out and back in, or restart your session

"Cannot connect to Docker daemon"

  1. Make sure Docker Desktop is running (macOS/Windows)
  2. Check Docker service status (Linux): sudo systemctl status docker
  3. Try restarting Docker service: sudo systemctl restart docker

WSL2 issues (Windows)

If using WSL2 backend:

  1. Make sure WSL2 is properly installed
  2. Update WSL2 kernel: wsl --update
  3. In Docker Desktop settings, ensure "Use WSL2 based engine" is checked

Next Step

Step 6: Artifact Management (Company Required)

Note: The next steps are company-specific tools that are required for all company development work.