一、镜像操作
1.1 搜索镜像
docker search 镜像名称
docker search 镜像名称:标签名称
[root@docker ~]
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
nginx Official build of Nginx. 15404 [OK]
jwilder/ nginx- proxy Automated Nginx reverse proxy for docker con… 2063 [OK]
richarvey/ nginx- php- fpm Container running Nginx + PHP- FPM capable of… 816 [OK]
jc21/ nginx- proxy- manager Docker container for managing Nginx proxy ho… 240
linuxserver/ nginx An Nginx container, brought to you by LinuxS… 152
tiangolo/ nginx- rtmp Docker image with Nginx using the nginx- rtmp… 140 [OK]
jlesage/ nginx- proxy- manager Docker container for Nginx Proxy Manager 135 [OK]
alfg/ nginx- rtmp NGINX, nginx- rtmp- module and FFmpeg from sou… 106 [OK]
jasonrivers/ nginx- rtmp Docker images to host RTMP streams using NGI… 92 [OK]
nginxdemos/ hello NGINX webserver that serves a simple page co… 72 [OK]
privatebin/ nginx- fpm- alpine PrivateBin running on an Nginx, php- fpm & Al… 56 [OK]
nginx/ nginx- ingress NGINX and NGINX Plus Ingress Controllers fo… 55
nginxinc/ nginx- unprivileged Unprivileged NGINX Dockerfiles 47
staticfloat/ nginx- certbot Opinionated setup for automatic TLS certs lo… 24 [OK]
nginx/ nginx- prometheus- exporter NGINX Prometheus Exporter for NGINX and NGIN… 19
schmunk42/ nginx- redirect A very simple container to redirect HTTP tra… 19 [OK]
nginxproxy/ nginx- proxy Automated Nginx reverse proxy for docker con… 19
centos/ nginx- 112- centos7 Platform for running nginx 1. 12 or building … 15
centos/ nginx- 18- centos7 Platform for running nginx 1. 8 or building n… 13
raulr/ nginx- wordpress Nginx front- end for the official wordpress:f… 13 [OK]
flashspys/ nginx- static Super Lightweight Nginx Image 10 [OK]
mailu/ nginx Mailu nginx frontend 9 [OK]
sophos/ nginx- vts- exporter Simple server that scrapes Nginx vts stats a… 7 [OK]
ansibleplaybookbundle/ nginx- apb An APB to deploy NGINX 2 [OK]
wodby/ nginx Generic nginx 1 [OK]
[root@docker ~]
1.2 下载镜像
docker pull 镜像名称
[root@docker ~]
Using default tag: latest / / 如果下载时不指定标签,会默认下载最新的镜像,latest表示最新
latest: Pulling from library/ nginx
a330b6cecb98: Pull complete
5ef80e6f29b5: Pull complete
f699b0db74e3: Pull complete
0f701a34c55e: Pull complete
3229dce7b89c: Pull complete
ddb78cb2d047: Pull complete
Digest: sha256:c442ff5a3d9f6dc92dd8aee388ece42d965e002805e3edaaff34e79d8ee6d0a4
Status: Downloaded newer image for nginx:latest
docker. io/ library/ nginx:latest
[root@docker ~]
1.3 镜像打标签
docker tag 镜像名称:旧标签名 镜像名称:新标签名
[root@docker ~]
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 822b7ec2aaf2 54 minutes ago 133MB
[root@docker ~]
[root@docker ~]
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 822b7ec2aaf2 55 minutes ago 133MB
nginx lnmp 822b7ec2aaf2 55 minutes ago 133MB
[root@docker ~]
1.4 查看镜像信息