How did I fix «Something wicked happened resolving 'apt.dockerproject.org:https' (-5 - No address associated with hostname)»?

The error occured because I had the deb https://apt.dockerproject.org/repo debian-jessie main declaration in the /etc/apt/sources.list.d/docker.list file.
The dockerproject.org repository has been shut down since 2020-03-31:

add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   $(lsb_release -cs) \
   stable"

See also: