In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail the sample analysis of common docker commands and configuration modifications. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Docker modifies the address of domestic source warehouse:
Vim / etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com"]"
}
Docker common commands
Docker-- help: get docker help
Docker container: creating a docker mirror
Image management: docker image-- help ls: list images images: view all image information history: view image history information inspect: view image details pull: download image push: push image rmi: delete image save: save image docker image save nginx:v1 > nginx.tar import : import container docker image import image_name.tar login: log in to container repository (default log in to docker hub repository) docker login IP:PORT (log in to self-built warehouse) Image command: docker Commands: tag: tag the image docker tag nginx:1.11 nginx:v1 load: load the image docker load nginx:v1
< nginx.tar export : 导出正在运行中的容器 docker export >Image_name.tardocker management command: enter the running container docker exec-it-- name bs sh to create the container docker run-itd-- network NETWORK_NAME-v vlue:vlue-p port:port-- restart always-- name bs busybox / sh-v vlue:vlue local volume path: volume path in docker-p port:port mapped local port: Port in docker-e lsit Set environment variable-- env-file read environment variable from file-- add-host adds other hosts to the / etc/hosts-m (--memeory) container in the container can use maximum memory-- cpus limits the cpu resources that can be used by the container-- dns list sets the DNS server -- oom-kill-disable when the host is out of memory Will kill the process in the container And-m (--memory) use the container management command docker Commands: docker conrainer ls: view containers running in docker inspect: view container details exec: enter a container cp: copy local files to the container logs: view the container operation log Port: view container port mapping stats: view resource usage statistics for the same period top: view processes running by a container update: update one or more container configurations start/stop: start / stop one or more containers rm: delete one or more containers about This is the end of the article "sample analysis of common docker commands and configuration modifications". Hope that the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good, please share it 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
© 2024 shulou.com SLNews company. All rights reserved.