What to do if the image cannot be found after docker load

藏色散人
Release: 2022-01-04 17:14:00
Original
9567 people have browsed it

The reason why the image cannot be found after docker load is because the IMAGE ID is used when exporting the image save, and the image name is not used, so it will not be displayed. The solution is to re-execute "docker save -o csctbb. com/hadoop:3.3.0 >..." is enough.

What to do if the image cannot be found after docker load

The operating environment of this article: centos8 system, Docker 20.10.11, Dell G3 computer.

What should I do if the image cannot be found after docker load?

docker load -i cannot see the image after importing

[root@centos8 ~]# docker images                 
REPOSITORY          TAG        IMAGE ID       CREATED         SIZE
csctbb.com/hadoop   3.3.0      084faab5baec   7 hours ago     1.68GB
centos              8.1.1911   470671670cac   14 months ago   237MB
kubeguide/hadoop    latest     e0af06208032   4 years ago     830MB
Copy after login
[root@centos8 ~]# docker save 084faab5baec > csctbb.com-hadoop.tar
Copy after login

Problem:

docker load -i After importing, there is no prompt for success , and no error is reported, docker images cannot see the imported image?

As above, my image has a name and tag

Explanation:

This is because the IMAGE ID is used when exporting the image save , the image name is not used, so it will not be displayed.

Use the following method:

 docker save -o csctbb.com/hadoop:3.3.0 > csctbb.com-hadoop.tar
Copy after login

Just import it again

I use containerd here ctr test, the principle is the same, the difference is the command method

[root@ck8s2 ~]# ctr image import csctbb.com-hadoop.tar 
unpacking csctbb.com/hadoop:3.3.0 (sha256:6198b39f874b8c6c31a06f2dc9113292c02533527feef8cf88b4e2b17e48d658)...done
[root@ck8s2 ~]# 
[root@ck8s2 ~]# ctr image import hadoop.tar 
unpacking csctbb.com/hadoop:3.3.0 (sha256:6198b39f874b8c6c31a06f2dc9113292c02533527feef8cf88b4e2b17e48d658)...done
[root@ck8s2 ~]# ctr images list
REF                                                                    TYPE                                                      DIGEST                                                                  SIZE     PLATFORMS                                                   LABELS 
csctbb.com/hadoop:3.3.0                                                application/vnd.docker.distribution.manifest.v2+json      sha256:6198b39f874b8c6c31a06f2dc9113292c02533527feef8cf88b4e2b17e48d658 1.6 GiB  linux/amd64
Copy after login

Recommended study: "docker tutorial"

The above is the detailed content of What to do if the image cannot be found after docker load. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template