This is the 6th day of my participation in the August More Text Challenge
There is no road in vain. Every step counts
preface
After understanding the core concepts of Docker, you can operate docker by command. This article introduces how to operate image in Docker.
Docker engine command
Docker info: Used to display various docker information, including version status and so on. The client and server information is displayed, indicating that Docker is a CS architecture. Docker server is used to receive client commands and execute them.
Docker version: displays the version number of the Docker client and server.
Docker –help(docker) : View all the help commands of a docker. The command format is docker [options] command
Docker image related commands
Docker images: View which images exist in the local repository.
REPOSITORY | Name of the mirror |
---|---|
TAG | Mirroring version (Latest: indicates the latest version) |
IMAGE ID | Mirror ID. Each mirror has a unique ID |
CREATED | Creation time of the official image |
SIZE | Image size |
Docker images [options] : This command can add options.
-a: lists all mirrors. -q: displays only mirror idsCopy the code
Docker pull image name :TAG: downloads the image from the remote repository. Before downloading, it is recommended to check whether the version you need is available on docker Hub, and you can directly copy the download command. The following image is a mysql image.
Docker search image name :TAG: The opening speed of dockerhub is sometimes very slow. Therefore, you can use this command to query whether a certain image exists on the command line. OFFICIAL Indicates whether the version is OFFICIAL.
Docker image rm Image name :TAG(image ID) : Deletes an image. You can use the image name + version number or the image ID to delete the image.
Docker image rm -f Image name :TAG(image ID) : If the image container is running, the image cannot be deleted by using the preceding command. You can forcibly delete the image by using the -f parameter, which is dangerous
Docker rmI [-f] Image name :TAG(image ID) : simplified version of the command to delete one or more images.
***docekr RMI [-f] (dockerimages−aq)∗∗ : Delete multiple images and assign the values generated by ‘dockerimages−q’ (all images) to ‘(dockerimages−aq) *** : Delete multiple images, assign the values generated by ‘dockerimages -q’ (all images) to ‘(dockerimages−aq)∗∗ : Delete multiple images, assign the values generated by’ Dockerimages − Q ‘(all images) to’ ‘, and then delete.
conclusion
The article was first published in the wechat public account Program Yuan Xiaozhuang, at the same time in nuggets.
The code word is not easy, reprint please explain the source, pass by the little friends of the lovely little finger point like and then go (╹▽╹)