In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what are the basic commands that must be mastered in docker. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Basic commands that must be mastered:
Docker images displays all mirrors docker rmi image_name deletes mirrors docker build-t tag:version Dockerfile_Directory generates mirrors (Eg:docker build-t runoob/ubuntu:v1. ) docker tag source_images:version target_images:version creates a new TAG docker run for the image-- name container_name-d tag:version running image (generates and starts the container from the image in the form of a background process)-- p 5001 tag:version 5000: Port mapping host port 5001 is mapped to container port 5000furov / tmp/data3:/data3:ro: rw docker login [ip] logs in to the Docker image warehouse when mounting the default permissions of data volumes If the address of the image repository is not specified, the default is that the official repository Docker Hubdocker push tag:version will push the image to the image repository (such as harbor) If you have logged in to the warehouse address) docker pull tag:verson acquires image docker save-o xxx.tar tag:version from image warehouse exports image docker load-- input xxx.tar imports image docker ps to view running containers (equivalent to docker container ls) docker ps-a view all containers (equivalent to docker container ls-- all) docker create-name container_name tag:version creates container docker rm container _ name Delete container docker start | stop | restart container_Name/container_Id start | close | restart container docker exec-it container_name bash enter the container internal docker logs-f container_name to print the container log-f:log will print immediately By default, only the current log is printed-tail=10: return the latest 10 logs docker stop $(docker ps-Q) disable all running containers docker rm $(docker ps-aq) delete all containers docker rm $(docker ps-aq)-force force delete all containers docker rmi `docker images | grep xxxxx | awk'{print $3} '``Delete images docker system df: view images and container hard drives occupy docker system Prune: cleans up stopped containers and suspended images in containers Unused volumes and networks,-a clears unused images
Readlink / var/lib/docker/overlay2/l: invalid argument reported an error
Need to clean up the image
This is the end of docker system prune's article on "what are the basic commands that must be mastered in docker". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Create Accounting APP-AR-294571: The Period Cannot Be Closed Due to Some Unprocessed Accounting Eve
© 2024 shulou.com SLNews company. All rights reserved.