Docker use tutorial related series catalog
table of Contents
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
View mirror details
docker image inspect image name
docker image inspect centos
Download 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
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
Remove unused images
docker image prune
After removing, it will prompt how much space to free up
Save image
docker image save nginx >nginx.tar
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
docker image load < nginx.tar