docker镜像常用命令
程序员文章站
2024-03-12 17:03:44
...
docker search 搜索指定镜像
OFFICIAL代表镜像官方提供的镜像
[[email protected] ~]# docker search ngnix
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
userxy2015/ngnix ngnix 11
merpso/ngnix-plus-k8s-ingress NGNIX+ kubernetes-ingess 2
ludwringliccien/ngnix-php7.1 ngnix-php7.1 1 [OK]
jhuiting/ngnix 1
bguruprasad/ngnix-print-hostname ngnix-print-hostname 0
bharath2012/ngnix 0
alamalhoda/ngnix 0
afzal/ngnix_rate_limit ngnix rate limit examples 0
hamropatrorepo/ngnix-reverse-proxy 0
motork/ngnix-static-app Nginx with config for a static js app 0
silvade/ngnix-static ngnix docker image with ubuntu 0
sushanth53/ngnix_server ngnix server 0
theburi/ngnix ngnix 0
agualbbus/ngnix-php-proxy 0
caubequay00/ngnix-heroku Already set listen port of nginx to $PORT o… 0
sanghaiakshay/ngnix_https_webserver 0
jenorish/ngnix 0
starlkj/ngnix tde test 0 [OK]
covenant/ngnix 0
venkateshs2006/ngnix-php-fpm-laravel 0
sunbuild/ngnix-fpm-azure Linux app service : ngnix-fpm 0 [OK]
sitek/ngnix-vsftpd ngnix-vsftpd 0 [OK]
luigitricoli/ngnix-doom-fire A Doom fire static site over Ngnix 0
sunlitweb/ngnix 0
prad8018441/ngnix
docker pull 拉取指定镜像
没有指定TAG的,默认都是latest
[[email protected] ~]# docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
b380bbd43752: Pull complete
fca7e12d1754: Pull complete
745ab57616cb: Pull complete
a4723e260b6f: Pull complete
1c84ebdff681: Pull complete
858292fd2e56: Pull complete
Digest: sha256:644a70516a26004c97d0d85c7fe1d0c3a67ea8ab7ddf4aff193d9f301670cf36
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest
查看所有镜像
两种方式
[[email protected] ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
redis latest 7faaec683238 6 days ago 113MB
nginx latest 87a94228f133 6 days ago 133MB
hello-world latest feb5d9fea6a5 3 weeks ago 13.3kB
centos latest 5d0da3dc9764 4 weeks ago 231MB
registry latest b2cb11db9d3d 6 weeks ago 26.2MB
[[email protected] ~]# docker image ls
docker rmi 删除指定镜像
没有指定TAG,默认是latest
[[email protected] ~]# docker rmi redis
Untagged: redis:latest
Untagged: [email protected]:a89cb097693dd354de598d279c304a1c73ee550fbfff6d9ee515568e0c749cfe
Deleted: sha256:7faaec68323851b2265bddb239bd9476c7d4e4335e9fd88cbfcc1df374dded2f
Deleted: sha256:e6deb90762475cda72e21895911f830ed99fd1cc6d920d92873270be91235274
Deleted: sha256:2649acad13241d9c8d81e49357bc66cce459b352ded7f423d70ede7bd3bb7b89
Deleted: sha256:64007bba5fc220df4d3da33cecdc2d55dd6a73528c138b0fa1acd79fd6a9c217
Deleted: sha256:b2cc2f1bf8b1cca8ba7c19e1697f7b73755903ad8f880b83673fd6a697aca935
Deleted: sha256:fbd1283ab782925be4d990bd4bebe9ad5e5cf9a525abfb6fa87465e072da9d31
Deleted: sha256:e8b689711f21f9301c40bf2131ce1a1905c3aa09def1de5ec43cf0adf652576e
指定id删除
[[email protected] ~]# docker rmi feb5d9fea6a5
Untagged: hello-world:latest
Untagged: hello-[email protected]:37a0b92b08d4919615c3ee023f7ddb068d12b8387475d64c622ac30f45c29c51
Deleted: sha256:feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412
Deleted: sha256:e07ee1baac5fae6a26f30cabfe54a36d3402f96afda318fe0a96cec4ca393359
上一篇: 编译docker镜像常用命令