Docker
Lab Sessions
Docker
Docker
Download
Download Docker Desktop from the official website:
download link
Choose the installer for your operating system:
- Windows (Docker Desktop for Windows)
- macOS (Docker Desktop for Mac – Intel or Apple Silicon)
Windows Installation
Installation Steps
- Download Docker Desktop for Windows.
- Run the installer.
- During installation, ensure the following:
- Enable Use WSL 2 instead of Hyper-V (recommended)
- Allow required components to install (
WSL 2, Linux kernel updates)
- Restart the system if prompted.
Verify Installation
Open PowerShell or Command Prompt and run:
docker --versionThen verify Docker is running:
docker run hello-worldIf you see a “Hello from Docker!” message, the installation is successful.
Common Windows Issues
If Docker reports that WSL 2 is not installed:
Install WSL 2 manually:
wsl --installRestart your machine and try again.
If Docker fails to start, ensure:
- Virtualization is enabled in BIOS.
- WSL is enabled in Windows Features.
macOS Installation
Installation Steps
- Download Docker Desktop for macOS.
- Open the
.dmgfile. - Drag Docker.app into the Applications folder.
- Start Docker Desktop from Applications.
Verify Installation
Open Terminal and run:
docker --versionThen run:
docker run hello-worldIf the container runs successfully, Docker is installed correctly.
Post-Installation Setup
Increase Resource Limits (Optional but Recommended)
Open Docker Desktop → Settings → Resources, and adjust:
- CPU
- Memory
- Disk image size
For database-heavy workloads, set at least:
- 2 CPUs
- 4 GB RAM
Enable Kubernetes (Optional)
Open Docker Desktop → Settings → Kubernetes → Enable Kubernetes.
We will not cover it in this course.
Recommended Docker Tools
For Development
- Docker Compose (included in Docker Desktop)
- Dev Containers (VS Code extension)
- Docker CLI
For Container Management
docker statsdocker ps -adocker logs <container>docker exec -it <container> /bin/bash
We will go over these during live sessions.
Useful Images for the Course
postgres:latestpgadmin:latestpython:3.12-slimjupyter/base-notebook