Skip to content

Latest commit

 

History

History
104 lines (73 loc) · 3.15 KB

File metadata and controls

104 lines (73 loc) · 3.15 KB

Below are step-by-step instructions to install Docker on Windows, Linux, and macOS. Additionally, I'll provide links to the official Docker documentation for each platform.

Install Docker on Windows:

Prerequisites:

  • Ensure that your Windows version is Windows 10 64-bit: Pro, Enterprise, or Education, with Hyper-V support.
  • Hyper-V should be enabled in your system's BIOS.

Steps:

  1. Download Docker Desktop for Windows from Docker Hub.

  2. Double-click the installer file to start the installation.

  3. Follow the installation wizard instructions. It may prompt you to enable Hyper-V and restart your computer during the process.

  4. Once the installation is complete, Docker Desktop will start automatically.

  5. Verify the installation by opening a command prompt and running the following command:

    docker --version
    docker run hello-world

Install Docker on Linux:

Prerequisites:

  • Make sure your Linux distribution supports Docker.
  • Users need to have sudo privileges.

Steps:

  1. Update the package index:

    sudo apt-get update
  2. Install Docker dependencies:

    sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
  3. Add Docker's official GPG key:

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  4. Set up the stable Docker repository:

    echo "deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  5. Update the package index again:

    sudo apt-get update
  6. Install Docker:

    sudo apt-get install docker-ce docker-ce-cli containerd.io
  7. Start and enable Docker service:

    sudo systemctl start docker
    sudo systemctl enable docker
  8. Verify the installation by running:

    docker --version
    docker run hello-world

Install Docker on macOS:

Prerequisites:

  • Ensure your macOS version is 10.14 (Mojave) or newer.

Steps:

  1. Download Docker Desktop for Mac from Docker Hub.

  2. Double-click the downloaded .dmg file to open the installer.

  3. Drag the Docker icon to the Applications folder.

  4. Launch Docker from the Applications folder.

  5. Once Docker Desktop is running, you will see the Docker icon in your menu bar.

  6. Verify the installation by opening a terminal and running:

    docker --version
    docker run hello-world

Official Docker Documentation:

Make sure to check the official documentation for any updates or additional details that may have been released after my knowledge cutoff date.