这篇文章主要介绍Docker使用技巧有哪些 ,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
这个命令是用来查看一个容器里面的进程信息的,比如你想查看一个nginx容器里面有几个nginx进程的时候,就可以这么做
➜ ~ docker top 3b307a09d20dUID PID PPID C STIME TTY TIME CMDroot 805 787 0 Jul13 ? 00:00:00 nginx: master process nginx -g daemon off;systemd+ 941 805 0 Jul13 ? 00:03:18 nginx: worker process
我一般使用这两个命令去下载打包k8s的镜像,因为你知道的中国的网速并不像国外那么快
docker save可以把一个镜像保存到tar文件中,你可以这么做
docker save registry:2.7.1 >registry-2.7.1.tar
同时docker load可以把镜像从tar文件导入到docker中
docker load < registry-2.7.1.tar
这个命令可以帮助你在命令行中方便的搜索dockerhub中的镜像,比如
➜ ~ docker search nginxNAME DESCRIPTION STARS OFFICIAL AUTOMATEDnginx Official build of Nginx. 13519 [OK]jwilder/nginx-proxy Automated Nginx reverse proxy for docker con… 1846 [OK]richarvey/nginx-php-fpm Container running Nginx + PHP-FPM capable of… 780 [OK]linuxserver/nginx An Nginx container, brought to you by LinuxS… 123bitnami/nginx Bitnami nginx Docker Image 87 [OK]tiangolo/nginx-rtmp Docker image with Nginx using the nginx-rtmp… 85 [OK]jc21/nginx-proxy-manager Docker container for managing Nginx proxy ho… 73alfg/nginx-rtmp NGINX, nginx-rtmp-module and FFmpeg from sou… 71 [OK]nginxdemos/hello NGINX webserver that serves a simple page co… 57 [OK]jlesage/nginx-proxy-manager Docker container for Nginx Proxy Manager 53 [OK]nginx/nginx-ingress NGINX Ingress Controller for Kubernetes 37privatebin/nginx-fpm-alpine PrivateBin running on an Nginx, php-fpm & Al… 31 [OK]schmunk42/nginx-redirect A very simple container to redirect HTTP tra… 18 [OK]nginxinc/nginx-unprivileged Unprivileged NGINX Dockerfiles 16nginx/nginx-prometheus-exporter NGINX Prometheus Exporter 14centos/nginx-112-centos7 Platform for running nginx 1.12 or building … 13centos/nginx-18-centos7 Platform for running nginx 1.8 or building n… 13raulr/nginx-wordpress Nginx front-end for the official wordpress:f… 13 [OK]sophos/nginx-vts-exporter Simple server that scrapes Nginx vts stats a… 7 [OK].........
以上是“Docker使用技巧有哪些 ”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。