Docker common operation mirror commands

Docker use tutorial related series catalog


table of Contents

Find the mirror

List mirrors

View mirror details

​Download mirror

Delete mirror

Save image

Load image (load image in offline environment)


Find the mirror

docker search tomcat

NAME: Mirror name

DESCRIPTION: Mirror description

STARS: User evaluation, the higher the value, the more popular

OFFICIAL: Is it official

AUTOMATED: Automatically build, which means that the image was created by the docker hub automatic build process;

List mirrors

docker images 
docker image ls

0

View mirror details

docker image inspect image name

docker image inspect centos

0Download mirror

docker pull image name: version number

Do not write the version number, get the latest image by default

docker pull nginx:1.18.0

0

0

 How to query the version of the image provided by the third party:

https://hub.docker.com/search?q=nginx&type=image

Delete mirror

docker image rm image name: version number

docker image rm nginx:1.18.0

If the version number is not added, delete the latest version

0

 

Remove unused images

docker image prune

After removing, it will prompt how much space to free up

 0

Save image

docker image save nginx >nginx.tar

0

This image package can be provided to friends

Load image (load image in offline environment)

Get the image package from a friend and put it on the docker server

For local demonstration, delete the local nginx mirror first, and then load the friend’s mirror

0

docker image load < nginx.tar

0

 

Guess you like

Origin blog.csdn.net/shi_hong_fei_hei/article/details/114238954