codegurukool.com · Free coding tutorials & online compiler

Home › Docker Tutorial › Docker installation

Docker installation

Install Docker and run your first container.

Windows

  1. Check that virtualization is on (Task Manager, Performance, CPU shows Virtualization: Enabled).
  2. Download Docker Desktop from docker.com and run the installer. Keep the WSL 2 option ticked.
  3. Restart the computer if asked, then start Docker Desktop and accept the terms.

macOS

  1. Download Docker Desktop for Apple chip or Intel chip (Apple menu, About This Mac shows which you have).
  2. Open the .dmg and drag Docker to Applications.
  3. Open Docker and wait for the whale icon to stop moving.

Linux (Ubuntu or Debian)

  1. Follow the apt steps for Docker Engine on docs.docker.com/engine/install.
  2. Run sudo usermod -aG docker $USER so you do not need sudo for every command.
  3. Log out and in again.

Check it works

  1. Open a terminal and run docker --version.
  2. Run docker run hello-world. You should see Hello from Docker.

If something goes wrong

Example code

docker --version

Run this code in the online editor

← Docker introductionImages, containers and registries →