Downloading documentation for offline reading at the Linux console

How to download Docker documentation for offline reading at the Linux console?

Preference order:

  1. archive of plain text files
  2. archive containing PDF files
  3. archive of HTML/CSS/… files

Use case: I was logged on a Linux server with Docker and needed to look up how to pass multiple environment variables to docker run. I tried docker run --help | less and man docker-run but they weren’t as detailed as the online documentation in terms of supported syntax and examples so I missed being able to browse the equivalent locally.

You can clone the github repository: GitHub - docker/docker.github.io: Source repo for Docker's Documentation