Updated on 2023-09-18 GMT+08:00

Pulling an Image

How Do I Pull an Image from SWR by Calling APIs?

Currently, SWR does not provide APIs for image pull. You can pull images using the docker push command on a client.

Where Are the Images Pulled by Running the docker pull Command Stored?

Images pulled by running the docker pull command are stored on your local hosts. You can run the docker save command to save images into TAR archive files.

Can I Pull Images from Another Region?

Cross-region image pull over public network is supported.

Cross-region image pull over public network is supported. Ensure that you have obtained the correct login command. For example, if you want to pull an image from a repository in the CN North-Beijing4 region, obtain the login command of the image repository in the CN North-Beijing4 region.

Can SWR Be Accessed over Private Networks? Will I Be Charged for Pushing and Pulling Images over Private Networks?

If your machine and the image repository are in the same region, you can access the image repository over private networks. No additional fees are charged for private network access because you have paid for your servers and EIPs.

If your machine and the image repository are in different regions, the node must have access to public networks to pull images from the image repository.

Can I Pull Images on the SWR Console to a Local PC?

Images stored in SWR cannot be directly downloaded through the console. You can perform the following operations to pull the images:

  1. Obtain the image pull command on the image details page.
  2. Run the obtained command on the device where the Docker client is installed.

    Example:

    docker pull swr.ap-southeast-1.myhuaweicloud.com/group/nginx:v1

  3. Save the image as a TAR or TAR.GZ file.

    Example:

    docker save nginx:v1 > nginx.tar

  4. Download the file to the local host.