一、搜索镜像

很多情况下我们可能需要下载某一类别的镜像,这时候我们就会用到搜索功能,也可以去 docker hub 官网页面搜索。

使用语法如下。

Usage:  docker search [OPTIONS] TERM

Search the Docker Hub for images

Options:
-f, --filter filter Filter output based on conditions provided
--format string Pretty-print search using a Go template
--help Print usage
--limit int Max number of search results (default 25)
--no-trunc Don't truncate output

我们可以看到,第一个镜像是没有用户名的,并且 OFFICIAL 是 OK,这样的镜像是由 Docker 公司进行维护的。

二、下载镜像

使用方法如下。

Usage:  docker pull [OPTIONS] NAME[:TAG|@DIGEST]

Pull an image or a repository from a registry

Options:
-a, --all-tags Download all tagged images in the repository
--disable-content-trust Skip image verification (default true)
--help Print usage

正常情况下,我们输入查到的镜像的全称即可。

三、查看本地镜像

Usage:  docker images [OPTIONS] [REPOSITORY[:TAG]]

List images

Options:
-a, --all Show all images (default hides intermediate images)
--digests Show digests
-f, --filter filter Filter output based on conditions provided
--format string Pretty-print images using a Go template
--help Print usage
--no-trunc Don't truncate output
-q, --quiet Only show numeric IDs

四、显示镜像构建历史

Usage:  docker history [OPTIONS] IMAGE

Show the history of an image

Options:
--format string Pretty-print images using a Go template
--help Print usage
-H, --human Print sizes and dates in human readable format (default true)
--no-trunc Don't truncate output
-q, --quiet Only show numeric IDs

五、删除镜像

Usage:  docker rmi [OPTIONS] IMAGE [IMAGE...]

Remove one or more images

Options:
-f, --force Force removal of the image
--help Print usage
--no-prune Do not delete untagged parents

六、镜像创建

Usage:  docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

Create a new image from a container's changes

Options:
-a, --author string Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
-c, --change list Apply Dockerfile instruction to the created image
--help Print usage
-m, --message string Commit message
-p, --pause Pause container during commit (default true)

之前我们已经演示过了。

七、上传镜像

Usage:  docker push [OPTIONS] NAME[:TAG]

Push an image or a repository to a registry

Options:
--disable-content-trust Skip image signing (default true)
--help Print usage

之前已经演示过。

八、给镜像打 tag

Usage:  docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]

Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

Options:
--help Print usage

之前已经演示过。

九、存出和载入镜像

Usage:  docker save [OPTIONS] IMAGE [IMAGE...]

Save one or more images to a tar archive (streamed to STDOUT by default)

Options:
--help Print usage
-o, --output string Write to a file, instead of STDOUT
Usage:  docker load [OPTIONS]

Load an image from a tar archive or STDIN

Options:
--help Print usage
-i, --input string Read from tar archive file, instead of STDIN
-q, --quiet Suppress the load output

最新文章

  1. python 3.5 成功安装 scrapy 的步骤
  2. 介绍对称加密算法,最常用的莫过于DES数据加密算法
  3. Maven最佳实践:Maven仓库(转)
  4. git 学习使用总结一(本地操作)
  5. C#传真传址 结构体
  6. HTTPS实现原理
  7. CA提供的身份认证配置弃用
  8. 关于count(1) 和 count(*)
  9. javascript活动对象的理解——伪单例模式
  10. [NOIP2005]采药
  11. Ubuntu常用终端快捷键
  12. ##DAY12 UITableViewCell自定义
  13. ural1542 Autocompletion
  14. iPhone Info.plist属性说明
  15. async的异步使用es7
  16. explor img file
  17. table设置上下左右边距不一样-html
  18. Linux中的#和$区别
  19. 20155323刘威良《网络对抗》Exp7 网络欺诈防范
  20. Shape流动效果

热门文章

  1. HttpReader
  2. LeetCode 320. Generalized Abbreviation
  3. MyBatis的关联查询
  4. Oracle11g 新特性之动态变量窥视
  5. tarjan模板完整版
  6. Web API 跨域
  7. BZOJ1856[Scoi2010]字符串——组合数学+容斥
  8. RK3399 focaltech敦泰触摸屏移植调试
  9. Qt之模型/视图(自定义风格)
  10. linux下查看memcache是否正常