Install Docker on Ubuntu: could not resolve

While installing Docker on a Ubuntu WLS, I experienced some problems where no access to the above FQDN was possible.

This problem occurs, if you network doesn’t support IPv6. In this Case you have to force Ubuntu to use IPv4.

I had to do this in two different steps:

  1. Updating the docker Sources with apt-get update:
    $ apt-get -o Acquire::ForceIPv4=true update -y
  2. Installing the corresponding packages:
    $ apt-get -o Acquire::ForceIPv4=true install docker-ce -y