https://hub.docker.com/search?q=&type=image
由于国外源下载慢,使用国内源加速。
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://04be47cf.m.daocloud.io
其余方式参考:
https://www.cnblogs.com/happy4java/p/11206839.html
不指定TAG标签默认选择latest标签就会下载最新镜像,镜像内容会随着最新版本变更而变化,生产环境中需要指定标签。
docker pull ubuntu:18.04
从非官方仓库下载需要指定完整的仓库地址。
docker pull hub.c.163.com/public/ubuntu:18.04
下完后,利用镜像创建容器,运行bash命令执行打印Hello World
docker run –it ubuntu:18.04 bash echo “Hello World” exit
使用images命令
docker images
docker image ls
images子命令
列出所有镜像文件,默认否
列出镜像数字摘要值,默认否
过滤列出的镜像,如dangling=true只显示没有被使用的镜像
对输入结果中太长的部分是否进行截断,默认是
仅输出ID信息,默认否
原文:https://www.cnblogs.com/tz90/p/12232885.html