查看镜像
[root@sds-1 ~]# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
linuxserver/nginx latest dd9aa5a82e20 7 days ago 160MB
mysql latest 62a9f311b99c 11 days ago 445MB
[root@sds-1 ~]#
删除镜像
[root@sds-1 ~]# docker image rm mysql
Untagged: mysql:latest
Untagged: mysql@sha256:01cf53f2538aa805bda591d83f107c394adca8d31f98eacd3654e282dada3193
Deleted: sha256:62a9f311b99c24c0fde0a772abc6030bc48e5acc7d7416b8eeb72d3da1b4eb6c
Deleted: sha256:82aa89ee850095559cbbee1f9d4bdaf06e21e42712b5d1a8a1904907433a1af3
Deleted: sha256:36d3209ee2d8a848f1e0e2ba5659478bbb0b0ca05384d18d4dd3b0672b4010a8
Deleted: sha256:6d32091cb220b1edbc69f5273b28fbfa101454817c648486ad9a2af076914864
Deleted: sha256:7d573b2b106757175900238b651e16c932c0a2b869c4599003ce9ba3197631e3
Deleted: sha256:d70572fbf868824e1dd0a0bd684e3bf562bc007958225df91c4d4a77df693502
Deleted: sha256:dcab0fde696a660d7c3e45d4ac9ebe5e9ce43ece239c317d3447242cd84cd604
Deleted: sha256:5781a962b07d33d82e5a60f744b3f956a165a0d4126b236dcaf3257dd77a6603
Deleted: sha256:6a3139a04536b9c1b948e6868bfd6ddbc84d4f7dab4ee1fca9dd68bedae358ce
Deleted: sha256:e473ce839faf505ccdc9440441885908b276050fae3a77039d1224391065a2e6
Deleted: sha256:aa58c9ce77bf5364f06519d9fa2c6f4c85e123953d5c52b6587b738e887dda19
Deleted: sha256:59b4eb3bf015143f8688803a1ab730b574d85590559f02d26f176ea948277d37
Deleted: sha256:8fa655db5360a336ddd0256f573e27975628668063732ef91f820d4770db737c
[root@sds-1 ~]#
通过名字查找仓库中镜像
[root@sds-1 ~]# docker search nginx
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
nginx Official build of Nginx. 11866 [OK]
jwilder/nginx-proxy Automated Nginx reverse proxy for docker con… 1641 [OK]
richarvey/nginx-php-fpm Container running Nginx + PHP-FPM capable of… 736 [OK]
linuxserver/nginx An Nginx container, brought to you by LinuxS… 73
bitnami/nginx Bitnami nginx Docker Image 70 [OK]
tiangolo/nginx-rtmp Docker image with Nginx using the nginx-rtmp… 51 [OK]
nginxdemos/hello NGINX webserver that serves a simple page co… 24 [OK]
jc21/nginx-proxy-manager Docker container for managing Nginx proxy ho… 23
nginx/nginx-ingress NGINX Ingress Controller for Kubernetes 20
jlesage/nginx-proxy-manager Docker container for Nginx Proxy Manager 20 [OK]
schmunk42/nginx-redirect A very simple container to redirect HTTP tra… 17 [OK]
blacklabelops/nginx Dockerized Nginx Reverse Proxy Server. 12 [OK]
centos/nginx-18-centos7 Platform for running nginx 1.8 or building n… 11
centos/nginx-112-centos7 Platform for running nginx 1.12 or building … 10
nginxinc/nginx-unprivileged Unprivileged NGINX Dockerfiles 9
webdevops/nginx Nginx container 8 [OK]
nginx/nginx-prometheus-exporter NGINX Prometheus Exporter 5
sophos/nginx-vts-exporter Simple server that scrapes Nginx vts stats a… 5 [OK]
1science/nginx Nginx Docker images that include Consul Temp… 5 [OK]
mailu/nginx Mailu nginx frontend 3 [OK]
pebbletech/nginx-proxy nginx-proxy sets up a container running ngin… 2 [OK]
travix/nginx NGinx reverse proxy 2 [OK]
centos/nginx-110-centos7 Platform for running nginx 1.10 or building … 0
wodby/nginx Generic nginx 0 [OK]
ansibleplaybookbundle/nginx-apb An APB to deploy NGINX 0 [OK]
[root@sds-1 ~]#
下载镜像
[root@sds-1 ~]# docker image pull nginx
Using default tag: latest
latest: Pulling from library/nginx
1ab2bdfe9778: Pull complete
a17e64cfe253: Pull complete
e1288088c7a8: Pull complete
Digest: sha256:53ddb41e46de3d63376579acf46f9a41a8d7de33645db47a486de9769201fec9
Status: Downloaded newer image for nginx:latest
[root@sds-1 ~]#