记录下在CentOS7中安装Docker CE 1. 卸载系统中可能存在的老版本2. 开始安装docker CE
复制执行以下命令,安装Docker所需的包。其中: 复制执行如下命令,安装stable仓库。必须安装stable仓库,即使你想安装edge或test仓库中的Docker构建版本。 [可选]执行如下命令,启用edge及test仓库。edge/test仓库中其实也包含在了docker.repo文件中,但默认是禁用的,可使用以下命令启用 复制执行以下命令,更新yum的包索引 复制执行如下命令即可安装最新版本的Docker CE 启动docker 验证安装是否正确 Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:7d91b69e04a9029b99f3585aaaccae2baa80bcf318f4a5d2165a9898cd2dc0a1
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./For more examples and ideas, visit:
https://docs./get-started/
使用脚本来安装Dockers
|