Green YGreck Guides FR
🐧 LinuxIntermediate⏱ 15 min5 steps

Install Docker on Linux

Install Docker and run your first container.

  1. For a test machine, the official convenience script is the quickest. For a production server, prefer your distribution's official repository (see the Docker documentation).
  2. Download, read, then run the script:
    curl -fsSL https://get.docker.com -o get-docker.sh
    less get-docker.sh
    sudo sh get-docker.sh
  3. Test with a minimal container:
    sudo docker run --rm hello-world
  4. To use docker without sudo, add yourself to the group (log out and back in required):
    sudo usermod -aG docker $USER
  5. Common commands:
    docker ps -a
    docker images
    docker system prune
⚠️ Being in the docker group is equivalent to root access on the machine: reserve it for trusted accounts.