White Lotus Security Logo
BlogContact Us

Get Started with Docker

By admin

9/18/2025

2 min read

28 views

Get Started with Docker
docker
linux
mac
windows

🚀 How to Set Up Docker on Windows, Linux, and macOS

Docker is a powerful tool that lets you run applications inside lightweight containers. Whether you’re a developer, sysadmin, or just curious, setting up Docker on your system is the first step to working with containers. This guide walks you through installing Docker on Windows, Linux, and macOS.


🔹 Prerequisites


🪟 Installing Docker on Windows

Docker Desktop for Windows is the easiest way to get started.

  1. Download Docker Desktop

  2. Run Installer

    • Double-click the .exe file and follow the installation wizard.
    • Make sure WSL 2 (Windows Subsystem for Linux) is enabled. The installer can do this automatically.
  3. Start Docker Desktop

    • After installation, open Docker Desktop from the Start Menu.
    • You’ll see the Docker whale icon in your system tray.
  4. Verify Installation

    docker --version
    docker run hello-world
    

🐧 Installing Docker on Linux

Docker provides official packages for most Linux distributions. Here’s how to install it on Ubuntu/Debian (adjust for your distro).

  1. Uninstall old versions (if any)

    sudo apt-get remove docker docker-engine docker.io containerd runc
    
  2. Update package index

    sudo apt-get update
    
  3. Install required packages

    sudo apt-get install ca-certificates curl gnupg lsb-release
    
  4. Add Docker’s official GPG key

    sudo mkdir -m 0755 -p /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    
  5. Set up repository

    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
  6. Install Docker Engine

    sudo apt-get update
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    
  7. Verify Installation

    docker --version
    sudo docker run hello-world
    

💡 Optional: Add your user to the docker group so you don’t need sudo every time:

sudo usermod -aG docker $USER

Log out and back in for this to take effect.


🍎 Installing Docker on macOS

Docker Desktop for macOS provides a simple way to run Docker.

  1. Download Docker Desktop

  2. Install

    • Open the .dmg and drag Docker.app into Applications.
  3. Run Docker

    • Open Docker from Applications.
    • You’ll see the whale icon in the menu bar.
  4. Verify Installation

    docker --version
    docker run hello-world
    

✅ Verifying Everything Works

Run a simple test container:

docker run hello-world

You should see a message confirming that Docker is working correctly on your system.


🎯 Conclusion

You now have Docker installed on Windows, Linux, and macOS! With Docker up and running, you can:

Docker opens up a world of development and deployment possibilities. 🚢


Category: View more in this category

← Back to Blog
Copyright © All Rights Reserved.