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/