Docker学习(三)

docker search 搜索镜像

docker search mysql
NAME                              DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
mysql                             MySQL is a widely used, open-source relation…   11390     [OK]       
mariadb                           MariaDB Server is a high performing open sou…   4322      [OK]       

#可选项,通过收藏来过滤

--filters=STARS=3000 #搜出来的就是STARS大于3000的
docker search mysql --filter=STARS=3000

docker pull下载镜像

docker pull mysql
Using default tag: latest #如果不写tag,默认就是最新版
latest: Pulling from library/mysql
a330b6cecb98: Pull complete  #分层下载,docker image的核心,联合文件系统
9c8f656c32b8: Pull complete 
88e473c3f553: Pull complete 
062463ea5d2f: Pull complete 
daf7e3bdf4b6: Pull complete 
1839c0b7aac9: Pull complete 
cf0a0cfee6d0: Pull complete 
1b42041bb11e: Pull complete 
10459d86c7e6: Pull complete 
b7199599d5f9: Pull complete 
1d6f51e17d45: Pull complete 
50e0789bacad: Pull complete 
Digest: sha256:99e0989e7e3797cfbdb8d51a19d32c8d286dd886279 4d01a547651a896bcf00c  #签名
Status: Downloaded newer image for mysql:latest #真实dizh

docker pull
docker pull docker.io/library/mysql:latest
#以上两个命令等价
docker pull mysql:5.7
5.7: Pulling from library/mysql
a330b6cecb98: Already exists 
9c8f656c32b8: Already exists 
88e473c3f553: Already exists 
062463ea5d2f: Already exists 
daf7e3bdf4b6: Already exists 
1839c0b7aac9: Already exists 
cf0a0cfee6d0: Already exists 
fae7a809788c: Pull complete 
dae5a82a61f0: Pull complete 
7063da9569eb: Pull complete 
51a9a9b4ef36: Pull complete 
Digest: sha256:d9b934cdf6826629f8d02ea01f28b2c4ddb1ae27c32664b14867324b3e5e1291
Status: Downloaded newer image for mysql:5.7
docker.io/library/mysql:5.7

remove 删除镜像

docker rmi -f 0716d6ebcc1a #删除指定镜像
docler rmi -f 镜像id 镜像id 镜像id #
docker rmi -f $(docker images -aq) #aq查出所有的id。递归全部删除所有镜像
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值