pub fn docker_script(user: Option<&str>) -> RootScriptExpand description
Docker Engine, then the user into the docker group so the CLI can reach the daemon without
root (pkexec runs as root, so $USER there is root: the name comes from the app). The group
applies from the next login.
On Ubuntu, Debian and Raspbian, and their derivatives (on the Ubuntu or Debian release they are
built on, when they say it), it sets up Docker’s apt repository, the way Docker documents it,
with Docker’s key checked against its pinned fingerprint. Where that repository has no packages
for the release (Kali’s rolling one, Devuan’s, a Debian or Ubuntu newer than Docker serves yet:
its Release file answers 404), it installs the distribution’s own Docker (docker.io and its Compose), signed by the
distribution’s own keys. When download.docker.com can’t be reached, it stops and says so. Elsewhere
it stops, changing nothing, with a code read as StepFailed::NotServed (a UI says where to get Docker): Docker’s convenience
script (get.docker.com) can’t be held to a key (it fetches the key and installs what it signed
in one go), so it never runs as root from here.