一.系统环境

[root@weblamp ~]# cat /etc/redhat-release
CentOS release 6.8 (Final)
[root@weblamp ~]#

二.yum安装

[root@weblamp ]# yum install -y epel-release
[root@weblamp ]# yum install -y docker-io
[root@weblamp ]# ll /etc/sysconfig/docker
-rw-r--r-- 1 root root 530 Aug 15 2015 /etc/sysconfig/docker

[root@weblamp ]# service docker start
Starting cgconfig service: [ OK ]
Starting docker: [ OK ]
[root@weblamp ]# docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d/1.7.1
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d/1.7.1
OS/Arch (server): linux/amd64
[root@weblamp ]#

三.配置加速器地址:

使用自己的阿里云账号,登录阿里云dock 容器,获取自己的dock镜像地址。
[root@weblamp ~]# vim /etc/sysconfig/docker
other_args="--registry-mirror=https://amcoo07e.mirror.aliyuncs.com"

root@weblamp ~]# vim /etc/sysconfig/docker
[root@weblamp ~]# service docker restart
Stopping docker: [ OK ]
Starting docker: [ OK ]

检查配置是否成功
[root@weblamp ~]# ps -ef |grep docker
root 1363 1 0 09:59 pts/0 00:00:00 /usr/bin/docker -d --registry-
mirror=https://amcoo07e.mirror.aliyuncs.com
root 1410 1262 0 09:59 pts/0 00:00:00 grep docker

四.运行 hello-world

[root@weblamp ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from hello-world
65b27d3bd74d: Pull complete
9f5834b25059: Pull complete
Digest: sha256:fb158b7ad66f4d58aa66c4455858230cd2eab4cdf29b13e5c3628a6bfc2e9f05
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/

For more examples and ideas, visit:
https://docs.docker.com/get-started/

..........

#列出本地镜像
[root@weblamp ~]# docker images 
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
hello-world latest 9f5834b25059 4 days ago 1.84 kB

#列出所有的镜像含中间镜像层 -a:all
[root@weblamp ~]# docker images -a
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
hello-world latest 9f5834b25059 4 days ago 1.84 kB
<none> <none> 65b27d3bd74d 4 days ago 1.84 kB

转载于:https://www.cnblogs.com/ahtornado/p/10299831.html

实战dock安装和镜像的拉取相关推荐

  1. Centos中安装docker并查看拉取镜像的位置

    此操作全程在root用户下执行 一.docker安装 执行以下命令将yum包更新到最新版本 yum update 下载docker所需的软件包 yum install -y yum-utils dev ...

  2. (Docker实战) 第2篇:Centos7 拉取和部署Gitlab

    文章目录 搭建gitlab 1. 拉取并运行gitlab所需要的redis镜像 2. 拉取并运行gitlab所需要的postgresql镜像 3. 下载并运行gitlab 搭建gitlab 参考:ht ...

  3. jib构建镜像(使用阿里云容器镜像服务拉取镜像)

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/zhangjingao/article/details/83542452 jib的基本使用(使用阿里云 ...

  4. dockerhub 拉取地址_使用docker,进行dockerhub仓库上传镜像,拉取镜像。

    Docker Docker 是一个开源的应用容器引擎,基于 Go 语言 并遵从 Apache2.0 协议开源. Docker 可以让开发者打包他们的应用以及依赖包到一个轻量级.可移植的容器中,然后发布 ...

  5. Docker镜像的拉取和推送(阿里云镜像仓库)

    简介: 阿里云的容器镜像服务个人版是不要钱的,个人可以免费创建3个命名空间和最多可创建300个免费的镜像仓库供以使用,平时可以使用这项服务对个人的镜像进行管理,就可以不使用国外的DockerHub来对 ...

  6. ubuntu下安装,查看,拉取docker镜像

    参考文献: https://www.cnblogs.com/hupeng1234/p/9773770.html 根据这个文献以及浩哥的安装文档,跌跌撞撞也是成功了 其实首先在第一步更新apt-get的 ...

  7. kubernetes实战篇之创建密钥自动拉取私服镜像

    系列目录 前面我们讲解了如何搭建nexus服务器,以及如何使用nexus搭建docker私有镜像仓库,示例中我们都是手动docker login登陆私服,然后通过命令拉取镜像然后运行容器.然而这种做法 ...

  8. docker pull拉取镜像_docker拉取镜像失败解决

    今天在虚拟机上安装了docker-ce之后,从docker官网上去拉取镜像时,报如下错误 [root@localhost util-linux-2.27]# docker pull mysql:8.0 ...

  9. Docker 上传镜像amp;拉取镜像

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/qq_36367789/article/details/81623850 与git相似,docker也 ...

最新文章

  1. audio 上一首 下一首 自定义样式_HTML5中 audio标签的样式修改
  2. linux命令crontab
  3. 从ASP.NET Core 3.0 preview 特性,了解CLR的Garbage Collection
  4. 大数据分析的误区有哪些
  5. abb机器人goto指令用法_详解ABB机器人编程含中英文指令对照
  6. [Android] 安卓迅雷带云盘内测版7.0 简洁 无广告 官方版
  7. Cypress初探(一)
  8. SPARC架构下的反汇编(三)——SPARC汇编语言
  9. ref修改dom样式遇到的问题
  10. 安卓中自定义view控件代替radiogroup实现颜色渐变效果的写法
  11. 【二叉树的遍历-3】后序遍历(递归与非递归)
  12. 工业物联网平台有什么功能
  13. python RemoveBg api换照片底色
  14. 阿里云服务器永久修改主机名
  15. fossid安装教程_源代码怎么使用,源代码生成app教程
  16. 应聘华为各类工程师通信基础题库以及答案
  17. The Legend of 1900
  18. Cadence学习记录(一)元器件原理图绘制
  19. CMD命令工具--Windows下使用tree命令生成目录
  20. 2004年十月十一日

热门文章

  1. 双指针算法(四):力扣 88.合并两个有序数组 | 经典例题
  2. docker安装启动nginx详细步骤
  3. grouping Function
  4. Oracle 日志原理剖析
  5. C#返回mysql查询结果_c#查询MySQL是怎么接收返回结果的
  6. java jvm调优面试题_【Java面试题第一期】有没有jvm调优经验?调优方案有哪些?...
  7. 【必看】CCNA初学者必看的一篇文章
  8. 利用 Arthas 解决启动 StandbyNameNode 加载 EditLog 慢的问题
  9. 阿里云引领云原生进化 | 云原生生态周报 Vol. 60
  10. php查询过滤字段,PHPelasticsearch过滤查询字符串搜索