Docker-related error while running script

If you encounter Docker-related errors after executing the initenv.sh or prepareserver.sh scripts, try restarting the Docker service.

Example message:
* Pulling repository docker.io/library/ubuntu
* Error while pulling image: Get https://index.docker.io/v1/repositories/library/ubuntu/images: dial tcp: lookup index.docker.io on 192.168.0.0:00: DNS message ID mismatch

Explanation

The error could occur when the internet connection has changed (such as connecting to or disconnecting from a VPN or network configuration changes) and the Docker runtime environment has not yet restarted. In this scenario, errors would occur when any Docker command is issued.

How to resolve

Restart the Docker service. If the error persists, reboot the computer and then restart the Docker service.