一、安装yarn的工具
yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
二、配置docker-ce.repo
yum-config-manager --add-repo
https://download.docker.com/linux/centos/docker-ce.repo
三、开启docker的edge和test
yum-config-manager --enable docker-ce-edge
yum-config-manager --enable docker-ce-test
如果想关闭的话,可以使用一下命令
yum-config-manager --disable docker-ce-edge
四、安装docker-ce
yum install docker-ce
五、启动Docker
systemctl start docker
六、运行hello world
[root@local ~]# docker run hello-world
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://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
参考文档:https://docs.docker.com/engine/installation/linux/docker-ce/centos/#upgrade-docker-ce
转载请注明出处: http://www.julyme.com/20171201/96.html
打赏一个呗~~(微信)
Julyme
感觉还行吧。
Julyme的IT技术分享