Help Center> Software Repository for Container> FAQs> Troubleshooting> What Should I Do If Images Cannot Be Downloaded from Private Networks?
Updated on 2022-03-08 GMT+08:00

What Should I Do If Images Cannot Be Downloaded from Private Networks?

This is usually caused by incorrect DNS configurations. You can solve the problem by taking either of the following approaches:

  • Approach 1:

    Add a private DNS server address to the /etc/resolv.conf file. If you are not sure which private DNS server address to use in your region, see What Are the Private DNS Servers Provided by the HUAWEI CLOUD DNS Service.

    The newly added DNS server address must be placed before all existing DNS server addresses.

    Updates to DNS configurations take effect immediately after the /etc/resolv.conf file is saved.

  • Approach 2:

    Restarting an Elastic Cloud Server (ECS) will invalidate updates to the /etc/resolv.conf file on this ECS. You will have to update the file again. To avoid the repetitive modifications, take the following steps to change the DNS server address of the VPC subnet to the private DNS server address available in your region.

    Any changes to a VPC subnet will affect all ECSs in this subnet.

    1. On the management console, click Service List, and choose Network > Virtual Private Cloud to launch the VPC console.
    2. Change the DNS server address of the VPC subnet. For details, see How Do I Change Default DNS Servers of an ECS to Private DNS Servers Provided by the DNS Service.
    3. Restart the ECS, and check whether the private DNS server address is contained in the /etc/resolv.conf file and whether this address is placed before other DNS server addresses.

Troubleshooting FAQs

more