Downloading a Container Image

Downloading a Container Image Using containerd

  1. Run the following command to download an image to a local path. In the command, image:tag indicates the image to be pulled and its tag.

    ctr image pull <image>:<tag>
    
  2. Run the following command to export the image to a file. In the command, image:tag indicates the image to be exported, and file indicates the name of the exported image file.

    ctr image export <file>.tar <image>:<tag>
    

Downloading a Container Image Using Docker

  1. Run the following command to download an image to a local path. In the command, image:tag indicates the image to be pulled.

    docker pull <image>:<tag>
    
  2. Run the following command to export the image to a file. In the command, image:tag indicates the image to be exported, and file indicates the name of the exported image file.

    docker save <image>:<tag> -o <file>.tar
    

Downloading a Container Image Using Podman

  1. Run the following command to download an image to a local path. In the command, image:tag indicates the image to be pulled.

    podman pull <image>:<tag>
    
  2. Run the following command to export the image to a file. In the command, image:tag indicates the image to be exported, and file indicates the name of the exported image file.

    podman save <image>:<tag> -o <file>.tar