Docker 官网安装实践

Docker 官网安装实践

MAC Docker.dmg安装

https://docs.docker.com/desktop/install/mac-install

Docker 产品手册
在这里插入图片描述
安装命令实践

# yum install -y yum-utils

....省略....

更新完毕:
  yum-utils.noarch 0:1.1.31-54.el7_8                                                                                                                                                      

作为依赖被升级:
  python-urlgrabber.noarch 0:3.10-10.el7    rpm.x86_64 0:4.11.3-45.el7    rpm-build-libs.x86_64 0:4.11.3-45.el7    rpm-libs.x86_64 0:4.11.3-45.el7    rpm-python.x86_64 0:4.11.3-45.el7   
  yum.noarch 0:3.4.3-168.el7.centos        

完毕
[root@VM_0_13_centos /]# sudo yum-config-manager \
>     --add-repo \
>     https://download.docker.com/linux/centos/docker-ce.repo
已加载插件:fastestmirror, langpacks
Repository epel is listed more than once in the configuration
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo

/etc/yum.repos.d/docker-ce.repo

[root@VM_0_13_centos /]# sudo yum install docker-ce docker-ce-cli containerd.io

....省略....

从 https://download.docker.com/linux/centos/gpg 检索密钥
导入 GPG key 0x621E9F35:
 用户ID     : "Docker Release (CE rpm) <docker@docker.com>"
 指纹       : 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 来自       : https://download.docker.com/linux/centos/gpg
是否继续?[y/N]:y

....省略....

已安装:
  containerd.io.x86_64 0:1.4.4-3.1.el7                           docker-ce.x86_64 3:20.10.6-3.el7                           docker-ce-cli.x86_64 1:20.10.6-3.el7
[root@VM_0_13_centos /]# sudo systemctl start docker
[root@VM_0_13_centos /]# sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete 
Digest: sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519
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/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值