Docker common commands
1. Basic commands for Docker image operation
[root@localhost ~] # docker search image name / / search image (find it on the official website of docker Hub)
[root@localhost ~] # docker pull image name / / download image (if you do not specify an image label to download the latest version of the image by default)
[root@localhost ~] # docker push repository name / warehouse account / image name / upload image
[root@localhost ~] # docker images / / query all images downloaded locally
[root@localhost ~] # docker images image name / / query the specified image
[root@localhost ~] # docker inspect container name or container ID / / query image details
[root@localhost ~] # docker tag original image name and tag generated image name and tag / / create a new name and label for the local image (the source image still exists)
[root@localhost ~] # docker rmi image name or image ID / / Delete a local image
[root@localhost ~] # docker rmi image name or image ID / / forcibly delete a local image
/ / Note: the mandatory method applies when a container is using this image.
/ / if the container cannot be deleted at run time, and if it is deleted after the container stops, the container can still be used
[root@localhost ~] # docker save > the name of the file image generated by image
[root@localhost ~] # docker save-o Image name of file generated by image / / generate a new image file by image
[root@localhost ~] # docker load
< 镜像文件 [root@localhost ~]# docker load --i 镜像文件 //将本地的镜像文件生成为镜像 //建议:">"and"