Skip to content

Latest commit

 

History

History
108 lines (68 loc) · 2.47 KB

File metadata and controls

108 lines (68 loc) · 2.47 KB

Installing Docker

Linux (Ubuntu)

To install Docker on Ubuntu, follow these steps:

  1. Update your existing list of packages:

    sudo apt update
  2. Install packages to allow apt to use a repository over HTTPS:

    sudo apt 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 apt-key add -
  4. Add the Docker APT repository:

    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  5. Update the package database with the Docker packages from the newly added repo:

    sudo apt update
  6. Make sure you are about to install from the Docker repo instead of the default Ubuntu repo:

    apt-cache policy docker-ce
  7. Install Docker:

    sudo apt install docker-ce
  8. Check that Docker is running:

    sudo systemctl status docker
  9. (Optional) Manage Docker as a non-root user:

    sudo usermod -aG docker ${USER}

Windows

To install Docker Desktop on Windows, follow these steps:

  1. Download Docker Desktop for Windows from the official Docker website.

  2. Run the Docker Desktop Installer, which you just downloaded, and follow the installation instructions.

  3. Enable WSL 2 if it is not already enabled:

    • Open PowerShell as Administrator and run:

      wsl --install
  4. Start Docker Desktop from the Start menu.

  5. Follow the guided onboarding to build your first container.

  6. Verify installation:

    • Open PowerShell and run:

      docker --version

MacOS

To install Docker Desktop on MacOS, follow these steps:

  1. Download Docker Desktop for Mac from the official Docker website.

  2. Open the downloaded Docker.dmg file and drag Docker to Applications.

  3. Run Docker Desktop from the Applications folder.

  4. Follow the installation process and authorize the installer with your system password.

  5. Verify installation:

    • Open Terminal and run:

      docker --version
  6. Start using Docker from the Docker menu in the top status bar.

This will set up Docker Desktop on all three platforms: Ubuntu, Windows, and MacOS.